
-----------------------------------
Homer_simpson
Thu May 15, 2003 1:01 am

anyone good with php here?
-----------------------------------
does anyone know how i can add or update data to mysql using php...
does anyone know how to use mysql_query function...
???????????????

-----------------------------------
Dan
Thu May 15, 2003 3:40 pm


-----------------------------------

$connection = mysql_connect ("host", "username", "pass");
$query = "insert into dbasename values ('$email', '$name')";
$result = mysql_db_query ("compsci_ca", $query);
mysql_close();


thats a simple ex on how to add stuff to a dbase where there are 2 string values.

-----------------------------------
Homer_simpson
Thu May 15, 2003 4:19 pm


-----------------------------------
"insert into dbasename values ('$email', '$name')";  which of my tables does that add the info too?

-----------------------------------
Dan
Thu May 15, 2003 4:21 pm


-----------------------------------
dbasename

-----------------------------------
Homer_simpson
Thu May 15, 2003 4:29 pm


-----------------------------------
aaaaaaaahhh... ic so u should have actually changed that to tablename... =Ãž. 

But here's another thing...what if i have some data already inserted in my table and i want to start adding data after the 10th line... then what do i do...?

-----------------------------------
Homer_simpson
Thu May 15, 2003 4:44 pm


-----------------------------------
i belive i should use where command... am i right?

-----------------------------------
Dan
Thu May 15, 2003 4:56 pm


-----------------------------------
this site is help full for figeriger this all out:

http://hotwired.lycos.com/webmonkey/programming/php/tutorials/tutorial4.html

it shode have your awnsers there.

-----------------------------------
Homer_simpson
Thu May 15, 2003 5:06 pm


-----------------------------------
yes it was a pretty good tutorial but i couldn't find one thing that i wanted in it... how do u erase a table...???
