Increment help..please

From: Date: Thu, 24 Jan 2002 19:43:50 +0000
Subject: Increment help..please
Groups: php.general 
Request: Send a blank email to php-general+get-81943@lists.php.net to get a copy of this message
please help I'm a newb and this is really messing with my head. All I want to know is what do I need to add to this script to allow it to increment the ID number..... pleaseeeeee. thank you very much for a simple boy!!!! Will <? $db_name = "altone"; $table_name = "author"; $connection = @mysql_connect("www.myserver.net", "test", "will") or die ("couldn't connect."); $db = @mysql_select_db($db_name, $connection) or die ("couldn't select database."); $sql = "INSERT INTO $table_name (id, name, email, picture_name) VALUES ('$id', '$name', '$email', '$picture_name') "; $result = @mysql_query($sql, $connection) or die ("couldn't execute query"); if ($picture != "") { move_uploaded_file($picture, "/home/mine/yep/php/$picture_name"); } ?> <html> <head> <title>my contact management system: add a contact</title> </head> <body> <table cellspace=3 cellpadding=5> <tr> <th>Name & email information</th> <th> </th> </tr> <tr> <td valign=top> <p><stong><font size="-2" face="Verdana, Arial, Helvetica, sans-serif">name:</font><br> <? echo "$table_name"; ?><br> <? echo "$name"; ?><br> <? echo "$id"; ?> </p> <p><stong><font size="-2" face="Verdana, Arial, Helvetica, sans-serif">email:</font><br><? echo "$email"; ?> <br> </p> <font size="-2" face="Verdana, Arial, Helvetica, sans-serif">File to Upload:</font><br> <img src=<? echo "http://www.myserver.net/php/$picture_name"; ?>> <p><stong></p> </td> <td valign=top> </td> </tr> <tr> <td align=center colspan=2> <div align="left"><br> </div> <p align="left"> <input type="submit" name="submit" value="add to contact system"> </p> <div align="left"></div> </td> </tr> </table> </body> </html> Cheers Will

« previous php.general (#81943) next »