I am an ASP user, now learning PHP.
When adding a record in ASP, I do this:
Recordset.AddNew Field1 = whatever RecordSet.Update
How is this done in PHP?
I have built a recordset using a query, and have all the information needed to go into the different fields, but how do I 'Edit' or 'AddNew' and 'Update'?
This is what I have:
<?php
unset($price); $price = $_GET['Price'];
unset($id); $id = $_GET['id'];
unset($partnumber); $partnumber = $_GET['PartNumber'];
unset($disc); $disc = $_GET['Disc'];
$link = mysql_connect('localhost', 'root', 'password'); if (!$link) { echo "Couldn't make a connection!"; exit; } $db = mysql_select_db("order", $link); if (!$db) { echo "Couldn't select database!"; exit; } $sql= "SELECT * FROM tborder WHERE sid='session.sessionid'"; $result = mysql_query($sql);
$total_records = mysql_num_rows($result);
?>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php