|
Posted by Jerry Stuckle on 10/11/07 04:23
deja@icepick.com wrote:
> On Oct 10, 7:54 pm, macca <ptmcna...@googlemail.com> wrote:
>> To see if they are coming though the URL to the script okay, which
>> they should be.
>>
>> echo $_GET['var1'] . "<br />" . $_GET['var2'];
>>
>> Try
>>
>> $var1 = mysql_real_escape_string($_GET['var1']);
>> $var2 = mysql_real_escape_string($_GET['var2']);
>>
>> $query = "INSERT INTO log VALUES ('$var1','$var2')";
>> mysql_query($query,$conn) or die(mysql_error());
>
>
> I tried both ideas.. but neither of them return me the string that I
> had in the url :(
>
> What I dont understand is that I can pass 1 string, just not multiple
> strings from the URL.
>
>
(Top posting fixed)
If your URL is really something like:
http://www.example.com?var1=blah&var2=blah
Then $_GET['var1'] will contain the first value, and $_GET['var2'] will
contain the second value. If it doesn't work, either your url is wrong
or you're not accessing the data correctly.
P.S. Please don't top post. And when using examples, use example.com as
the domain - that's what it's reserved for.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|