Jump to content

bigmuddyfoot

Members
  • Posts

    13
  • Joined

  • Last visited

Everything posted by bigmuddyfoot

  1. Thank you for that information. I think i found something that will work. I found a script that will generate a popup window (new browser window) and allow me to navigate to other pages with in that page. so it handles everything i need and i can call action to the close() action to close it out when im done.
  2. Hey everyone! I know this is possible and i bookmarked the code to do this but i can not find it for the life of me. Here is what i need. I am looking for a code that will get new entries (ones that are not all ready on the page) from mysql db then display them on the current page with out refreshing. I am just wanting a simple one. I just want it to display the data in a new div with in a existing div. My server does NOT support ajax, can any one help me please!?
  3. Hey guys. I need a little help. I am working on a site that is requiring me to do something a little fancier then i know how to do. let me explain. When my web admin is loged in to there is and they are editing a page (say there home page) and they want to add content to there home page. They would do the following. (see picture attachment as well.) Click the Add content div (div with a + symbol in it) A Pop up comes up asking them what kind of content would you like to add. (text, picture. html) User selects a option (text for this example) the popup window now changes to a forum input box (meaning the popup never closes just the content in the pop changes from option select to data input). once the user has entered there data they click submit the data is then added to the db and the popup closes and the user is brought back to there page they were working on which has the new content added to the page. I would think this would have something to do with Jquerry or does php handle this? Like i said this is all new to me and im trying to learn how to do this. I would like to use PHP, jquerry, mysql and javascript my server does not support asp. Any help would be greatly appreciated! PS: sorry if i posted this in the wrong section, this just seamed like the best fit.
  4. I have posted there just waiting on a responce from them. Thought i would give here a try. The problem with changing the orderby it does it by the mysql db and not the event date...The event date is in a special field.
  5. It is a wordpress function there is an include file that handles this. The code i posted does work just dont know how to handle the ordering portion.
  6. Hey everyone here is what i have so far..... <?php$posts = get_posts('numberposts=10&order=DESC&category=68&orderby=post_title');foreach ($posts as $post) : start_wp(); ?><?php echo "<hr>"; ?><?php echo the_event_end_date( $id, $showtime, $dateFormat); ?><?php echo "<hr>"; ?><?php the_title(); ?><?php the_excerpt(); ?><?phpendforeach;?> I need the the_excerpt and the the_title to sort in order from soonest to later. (event happening soonest to the one happening later that year)This code the_event_end_date( $id, $showtime, $dateFormat); displayed the event date in this format....June 16, 2013How can i sort this I am out of ideas???PLz HELP!!!!http://wordpress.org/extend/plugins/the-events-calendar/
  7. My bady on the $_GET, On my hosting server it works ether wayand as for the link i never had a problem with it when i have used it this way... I find it works very well. Seams like using a <div> inside of a <a href=""> would be no different then an <img> but i guess you can move the <a href=""> to inside the div it really does not mater works the same.
  8. Ok still not working here is what i have <form name="input" action="submit.php" method="POST"><?$var=$_GET['total'];$i=1;while($i<=$var) {?>Field 1: <input type="text" name="fname[<? echo $i; ?>]">Field 2: <input type="text" name="lname[<? echo $i; ?>]">Field 3: <input type="text" name="phone[<? echo $i; ?>]"> <? $i++; } ?> <input type="hidden" name="count" value="<? echo $_GET['total']; ?>"> <input type="submit" value="Submit"> </form> <?$con = mysql_connect("localhost","*************","*************");if (!$con) { die('Could not connect: ' . mysql_error()); }mysql_select_db("donavons_class_schedule", $con); $i=1;$var=$_POST['count']*3;$query = 'INSERT INTO felds (one, two, three) VALUES ';while($i<=$var) {echo $_POST['fname'][$i];echo $_POST['lname'][$i];echo $_POST['phone'][$i];$i++; }mysql_close($con);?> Still does not add to db
  9. I cant seam to get it to work what am i doing wrong?The script runs and does not error out, but nothing is saved to the db Here is my submit.php page (this saves it to the db) <?php$con = mysql_connect("*********","**********","**********!");if (!$con) { die('Could not connect: ' . mysql_error()); }mysql_select_db("donavons_class_schedule", $con);$query = 'INSERT INTO felds (one, two, three) VALUES ';foreach($_POST['text'] as $t) { $query .= "($t),";}// Remove the last comma$query = substr($query, 0, -1);mysql_close($con);?> Here is the index.php page (the page with the forum on it) <form name="input" action="submit.php" method="POST"><?$var=$_GET['total'];$i=1;while($i<=$var) {?>Field 1: <input type="text" name="text[]">Field 2: <input type="text" name="text[]">Field 3: <input type="text" name="text[]"> <? $i++; } ?> <input type="submit" value="Submit"> </form> And here is the picture of the db(http://www.php.donavonscreativeinnovations.com/db.JPG)
  10. Ok, I think i have this right? <?$var=$_GET['total'];$i=1;while($i<=$var) {?> Field 1: <input type="text" name="text[]">Field 2: <input type="text" name="text[]">Field 3: <input type="text" name="text[]"> <? $i++; } ?> Then to retrive them i use <? foreach($_POST['text'] as $t) { $query .= "($t),";}echo $query;?> What i dont under stand is this.here is mysql *******************************************************************|id| |fname| |lname| |startd| |datee| |night||1| |Kelly | |Hansen| |102412| |103012| |M||2| |matt | |blablabl| |100912| |101412| |T||3| |jessi | |blablabl| |101912| |102112| |Th| *******************************************************************This is where i would like to use the following code because there will be a different amount of fields used every time. <?$var=$_GET['total'];$i=1;while($i<=$var) {?> Field 1: <input type="text" name="text[]">Field 2: <input type="text" name="text[]">Field 3: <input type="text" name="text[]"> <? $i++; } ?> Then use $query = 'INSERT INTO table (field) VALUES ';foreach($_POST['text'] as $t) { $query .= "($t),";}// Remove the last comma$query = substr($query, 0, -1); To post it in the db how am i going to do that if my results from the array come out as: (this is data 1),(this is data 2),(this is data 3),(this is data 4),(this is data 5),(this is data 6),(this is data 7),(this is data 8),(this is data 9),(this is data 10),(this is data 11),(this is data 12) With this being my code from the forum page... <form name="input" action="submit.php" method="POST"><?$var=$_GET['total'];$i=1;while($i<=$var) {?>Field 1: <input type="text" name="text[]">Field 2: <input type="text" name="text[]">Field 3: <input type="text" name="text[]"> <? $i++; } ?> <input type="submit" value="Submit"> </form>
  11. If im understanding right you could do something like the following. <!DOCTYPE html><html><style>.btnopt {background: 000000;width:100px;float:left;border:1px solid red}</style><body><p>This is a paragraph. This text has no alignment specified.</p><a href="index.php?btn=1"><div class="btnopt">Btn 1</div></a><? if($_get['btn']==1){?>Text and div here...<?}?><a href="index.php?btn=2"><div class="btnopt">Btn 1</div></a><? if($_get['btn']==2){?>Text and div here...<?}?><a href="index.php?btn=3"><div class="btnopt">Btn 1</div></a><? if($_get['btn']==3){?>Text and div here...<?}?><a href="index.php?btn=4"><div class="btnopt">Btn 1</div></a><? if($_get['btn']==4){?>Text and div here...<?}?></body></html> If you wanted to make it a little nice you could add something like this: ( <? if($_get['btn']==your btn # here) { echo " style=\"background-color:#c0c0c0;\" "; )Just add that after class on lies that look like this...<a href="index.php?btn=1"><div class="btnopt">Btn 1</div></a>
  12. Foxy Mod Thank you for your help just to make sure i understand right the code below where the text[] is that will change automatically to text0 text1 text2 and so on? Field 1: <input type="text" name="text[]">Field 2: <input type="text" name="text[]">Field 3: <input type="text" name="text[]"> And $query = 'INSERT INTO table (field) VALUES ';foreach($_POST['text'] as $t) { $query .= "($t),";}// Remove the last comma$query = substr($query, 0, -1); This will just save every thing as a new row in mysql
  13. Hello everyone!I have a few questions, I have taken on a project this week that is kinda complex. My first question regarding this script is this: I am going to have a forum with a few drop downs text fields and text boxes and check boxes/selections. for this example lets say there is a total of 12 elements (from the above list) Thats the easy part no what i need to do is. I am going to have a $var that can be anything from 1 to 150, now i need the forum drop downs text fields, text boxes and check boxes/selections to repeat with in that forum for the amount of $var. Then when all that info is field out i need it to post to a mysql db. What i dont understand how to do is make php rename all the name boxes for each example by default i will have: |--fname--|--lname--|--start_date--| --end_date--|--night--| and so on.... So what im assuming i need to do is make php do (with $var being 3)... |--fname--|--lname--|--start_date--| --end_date--|--night--| and so on....|--fname1--|--lname1--|--start_date1--| --end_date1--|--night1--| and so on....|--fname2--|--lname2--|--start_date2--| --end_date2--|--night2--| and so on.... And how do i get my php insert mysql script to dynamically know names of the fields (fname, fname1, fname2....and so on) and have them stored in mysql. Thank you for the help!Kelly
×
×
  • Create New...