Dynadot .com transfer sale, only $10.12 with coupon code DYNA12, available while supplies last, ends October 31, 2026.

What's wrong with these PHP?

Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
Watch

Barrucadu

Established Member
Impact
64
heres the code:

PHP:
$query='update myfile_visitors set field02=\''.$browser.'\' where field01=\''.$_GET['field01'].'\', field03=\''.$_GET['field03'].'\'';
$result=mysql_query($query) or die("Could not execute the query:".mysql_error());

it returns the error:

Code:
Could not execute the query:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ' field03=' - - none - -'' at line 1

But, I cant fgure out whats wrong with it..

what its trying to do is change field02 to broswer wherever field01 = their ip and field03 = their referer.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
try for your query instead:

Code:
 $query='update myfile_visitors set field02=\''.$browser.'\' where field01=\''.$_GET['field01'].'\' and field03=\''.$_GET['field03'].'\'';

I just replaced your command with the word "and"
 
0
•••
thanks
 
0
•••
DomainEasy: flexible LTO options. Close more domain deals with financing.

We're social

Escrow.com
Spaceship
Escrowly
CryptoExchange.com
Domain Recover

NamePros updates

New in Parking: updated way to act on many domains or inquiries at once
Your domain list and inquiry list now have a bar above and below the list. Check the items you want, then choose an action in the bar...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back