strig over multiple lines?

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

lsorin
New php-forum User
New php-forum User
Posts: 3
Joined: Wed Mar 12, 2003 1:26 am
Location: Romania, Constanta
Contact:

strig over multiple lines?

Postby lsorin » Wed Mar 12, 2003 1:34 am

Hi, i a have a project to do in php and i'm kind of stucked...
It's aproblem with a string:

$query2="insert into info values('".$numetxt"', '".$prenumetxt"', '".$judetopt"', '".$orastxt"', '".$adresatxt"', '".$telefontxt"', '".$useridtxt"', '".$passwordpas"', '".$ocupatieopt"')";

when i try to run it it gives these error:

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in d:\inetpub\wwwroot\newuser.php on line 58

Please give me a hand...

User avatar
pootergeist
New php-forum User
New php-forum User
Posts: 191
Joined: Wed Jan 29, 2003 7:11 am
Location: UK
Contact:

Postby pootergeist » Wed Mar 12, 2003 2:37 am

you need dots . <--- after every variable

if you had enclosed your code in [ php] [/ php] tags you would have spotted that immediately.

'" .$var. "' etc etc

lsorin
New php-forum User
New php-forum User
Posts: 3
Joined: Wed Mar 12, 2003 1:26 am
Location: Romania, Constanta
Contact:

Postby lsorin » Wed Mar 12, 2003 4:49 am

thanx, i put the dot only before of the variable


Return to “PHP coding => General”

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest