0

Hi everybody
I am very new to PHP and MYSQL
How can I implement :

$q=$_GET["q"]; 
$CMY=$get["CMY"];
...
$query=("INSERT INTO the_array($CMY, model) 
                          VALUES('$q','dddd')");

$q and $CMY are results I get from AJAX, and I think the only way to save the results
is using the DB.

Edited by Ezzaral: Added code tags. Please use them to format any code that you post.

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by kukie
0
$Name=$_GET["name"];
$Email=$_GET["email"];
...
$sql="INSERT INTO tablename(db_field1, db_field2)
                              VALUES('$Name','$Email');

mysql_qyery($sql)

This is the most simplest way to insert data into database.

Edited by Ezzaral: Added code tags. Please use them to format any code that you post.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.