954,591 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

updating 2 HTML tables on one PHP page

I have an index.php. page which is a search on my MySQL database to update HTML tables in my results.php page.
I have a form on the index page as the search which is like this:


Search: DateWk #ArtistTitle   

charter
Newbie Poster
11 posts since Jun 2004
Reputation Points: 10
Solved Threads: 0
 

There is no problem with updating/inserting more than one record in a php page.

<form action="results.php." method="post">

Why do you have a period after results.php ? I hope it's just a typo in the post. As far as your other code, where in the code are you updating anything? Unless that's what you want us to write. Use the update command. Here's an example:

update TABLE set field1='string', field2=5, field3='$data' where fieldid=2

If you need more help, let me know.

samaru
a.k.a inscissor
Team Colleague
1,256 posts since Feb 2002
Reputation Points: 262
Solved Threads: 18
 

single.gifuk54-31.gifwe54-31.gif 50 YEARS AGO TW LW Wks Title Artist <?php $i = 1; while($row = mysql_fetch_array($result)){ ?> <?php echo stripslashes($row['TW']); ?> <?php echo stripslashes($row['LW']); ?> <?php echo stripslashes($row['Wks']); ?> <?php echo stripslashes($row['Title']); ?> <?php echo stripslashes($row['Artist']); ?> <?php $i++; } ?>
single.gifno1.gifwe59-31.gif 45 YEARS AGO TW LW WKS TITLE ARTIST 1 1 5 LIVING DOLL Cliff Richard 2 2 11 DREAM LOVER Bobby Darin 3 3 7 BATTLE OF NEW ORLEANS Lonnie Donegan 4 5 3 BIG HUNK O' LOVE Elvis Presley j5 4 10 A TEENAGER IN LOVE Marty Wilde j5 6 6 LIPSTICK ON YOUR COLLAR Connie Francis 7 7 13 ROULETTE Russ Conway 8 8 9 PERSONALITY Anthony Newley 9 16 5 LONELY BOY Paul Anka 10 10 17 IT'S LATE Ricky Nelson 11 9 8 PETER GUNN Duane Eddy j12 14 3 RAGTIME COWBOY JOE David Seville & The Chipmunks j12 new2.gif 1 SOMEONE Johnny Mathis 14 11 10 GOODBYE JIMMY GOODBYE Ruby Murray j15 13 9 A TEENAGER IN LOVE Craig Douglas j15 19 5 I KNOW Perry Como j15 18 3 THE HEART OF A MAN Frankie Vaughan 18 17 3 YEP! Duane Eddy 19 12 25 SIDE SADDLE Russ Conway 20 15 15 MAY YOU ALWAYS Joan Regan 21 22 11 POOR JENNY Everly Brothers 22 28 24 PETITE fLEUR Chris Barber's Jazz Band 23 29 2 TWIXT TWELVE & TWENTY Pat Boone 24 new2.gif 1 SUMMER OF THE 17TH DOLL Winifred Atwell 25 21 8 TAKE A MESSAGE TO MARY Everly Brothers 26 new2.gif 1 ONLY SIXTEEN Craig Douglas 27 26 2 MIDNIGHT SHIFT Buddy Holly 28 26 3 WHY SHOULD I BE LONELY? Tony Brent j29 25 15 I'VE WAITED SO LONG Anthony Newley j29 new2.gif 1 MY MELANCHOLY BABY Tommy Edwards

charter
Newbie Poster
11 posts since Jun 2004
Reputation Points: 10
Solved Threads: 0
 

Thank you alot of for showing us how to solve this problem with html and php, i had similar issues and i solved it now. It is especially good having oprtunity to see these actual coding, we all now know were are we getting mistakes, thank you a lot of guys.

regards,
_________________________
web design sydney

100creative
Newbie Poster
1 post since Aug 2010
Reputation Points: 10
Solved Threads: 0
 

Thanks for the share , it was interesting and informative.
http://www.webski.com.au

ToniAdams
Newbie Poster
1 post since Dec 2011
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You