By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,044 Members | 1,155 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,044 IT Pros & Developers. It's quick & easy.

Read and insert to MySQL a URL-Variable

P: n/a
Hi, I'm sorry, I've a little question.. I want read 2 URL-Variable and
then to insert them in my DB (MySQL).

This is my code:

$insertSQL = sprintf("INSERT INTO nometabella (CAMPO1, CAMPO2) VALUES
('VAL1', 'VAL2')");
mysql_select_db($database_nomeconnessione, $nomeconnessione);
$Result1 = mysql_query($insertSQL, $nomeconnessione) or

How can I modifify?


I'm sorry formy english.
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
Hi "zack" (?),

given two variables named "var1" and "var2", try

$insertSQL = "INSERT INTO nometabella (CAMPO1, CAMPO2) " .
"VALUES ('" . addslashes($_REQUEST["var1"]) . "','" .
addslashes($_REQUEST["var2"]) . "')";

Greetings from Frankfurt / Germany,

Fabian Wleklinski
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.