PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old January 21st, 2005, 08:47 AM
m0untaind0g m0untaind0g is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 18 m0untaind0g User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 42 m 10 sec
Reputation Power: 0
Send a message via AIM to m0untaind0g
passing array values into mysql - Help please :)

How can I take these array values, which were submit via a form
Array ( [0] => Done [1] => 1 [2] => Northeast Ridge [3] => 2 [4] => Done [5] => 1 [6] => Kahiltna Spire [7] => 4 )

and have then put into variables that can update multiple rows in MySQL?

Here my code snipe from update page:

$com = array("$_POST[completed]", "$_POST[route_name]", "$_POST[id]", "$_POST[user_id]");
foreach ($com as $key => $values) {
include "include/db.php";
$query = "UPDATE ticklist SET completed = '$completed' WHERE route_name = '$route_name' AND id = '$id' AND user_id = '$user_id'";

$result = mysql_query($query,$db) or die(mysql_error($msg));

Basically I am trying update 2 rows in MySQL.

Last edited by m0untaind0g : January 21st, 2005 at 09:30 PM. Reason: no reason...

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > Passing variables with checkboxes = Multiple MySQL row updates - help


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT