Hey People,
I didnt know whether to post this in PHP or SQL because its a bit both so sorry if im in the wrong one. I’ve been set an assignment, and now im at the part where i have to be able to register a user by inserting their details into a database ( im using access ).
So my question is how do i read from a textbox on a form and then insert the data into a table row?
i know the syntax is something like:
INSERT INTO table_name
VALUES (value1, value2,….)
But can i replace ‘VALUES (value1, value2,….)’ with say, a php Variable for example:
[code=php]INSERT INTO table_name $sUser = $_POST[“txtUser”];
Could i do it this way? or can someone tell me the correct way to go about it? if so thanks very much, look forward to hearing from anyone ?