PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
guymclaren
Forum Newbie
Posts: 11 Joined: Tue Feb 17, 2009 10:53 pm
Post
by guymclaren » Mon Oct 05, 2009 9:12 am
Code: Select all
15. while($row = mysql_fetch_array($objRS, MYSQL_ASSOC)) {
16. $mailto = $row['mailto'];
17. $status = $row['status'];
18. $mailtoadd = ($mailto + 1);
19. $query = mysql_query("UPDATE companies SET mailto='".$mailtoadd."' WHERE id='".$ident"'");
gives this result?
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /var/www/vhosts/lowveldnet.co.za/httpdocs/findit/sendmail.php on line 20
Can anyone tell me why in words with minimum syllables please
Mirge
Forum Contributor
Posts: 298 Joined: Thu Sep 03, 2009 11:39 pm
Post
by Mirge » Mon Oct 05, 2009 9:27 am
Not seeing anything in that segment of code that would cause that error.
guymclaren
Forum Newbie
Posts: 11 Joined: Tue Feb 17, 2009 10:53 pm
Post
by guymclaren » Mon Oct 05, 2009 9:33 am
Mirge wrote: Not seeing anything in that segment of code that would cause that error.
My thoughts exactly, but when I comment the
Code: Select all
//$query = mysql_query("UPDATE companies SET mailto='".$mailtoadd."' WHERE id='".$ident"'");
line the script does everything else. that is line 20 as it happens
guymclaren
Forum Newbie
Posts: 11 Joined: Tue Feb 17, 2009 10:53 pm
Post
by guymclaren » Mon Oct 05, 2009 9:35 am
There was a full script here but it is unneccessary for the question and answer
Last edited by
guymclaren on Mon Oct 05, 2009 11:31 am, edited 1 time in total.
Mirge
Forum Contributor
Posts: 298 Joined: Thu Sep 03, 2009 11:39 pm
Post
by Mirge » Mon Oct 05, 2009 10:04 am
guymclaren wrote: Mirge wrote: Not seeing anything in that segment of code that would cause that error.
My thoughts exactly, but when I comment the
Code: Select all
//$query = mysql_query("UPDATE companies SET mailto='".$mailtoadd."' WHERE id='".$ident"'");
line the script does everything else. that is line 20 as it happens
$query = mysql_query("UPDATE companies SET mailto='".$mailtoadd."' WHERE id='".$ident"'");
Took me a second. You're missing the last period (dot) after $ident
guymclaren
Forum Newbie
Posts: 11 Joined: Tue Feb 17, 2009 10:53 pm
Post
by guymclaren » Mon Oct 05, 2009 11:23 am
Thank you coding god, boy do I feel like a tool
Mirge
Forum Contributor
Posts: 298 Joined: Thu Sep 03, 2009 11:39 pm
Post
by Mirge » Mon Oct 05, 2009 11:38 am
Happens to the best of us lol
jackpf
DevNet Resident
Posts: 2119 Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK
Post
by jackpf » Mon Oct 05, 2009 12:38 pm
guymclaren wrote: Thank you coding god
xD
Nice.