MySQL server version for the right syntax to use near '' at line 4 Error?

ok… I’m sending u the files I tried it in several places ( I commented them)…

and a image for the outcome…


qq.txt (11 KB)

Stan,

It’s looking good, I see you added the correct POSTS to set the Variables, Congrats…

Now do this…

Before this:

[php]$custUdt=mysql_query($udtSql) or die(mysql_error());[/php]

Add this:
[php]echo $udtSql; [/php]

It should output the query, post the output so I can see it.

done… now it just print the sql statement


That’s odd, do you see that none of the information is filled in the update statement, that’s why nothing gets updated.

That means the

//echo “bbb” . $cust_id;

is blank if you un-comment that out right?

Also I noticed an HTML error

Change:

<form form id="form1" name="form1" method="post" action="">

To:

<form id="form1" name="form1" method="post">

basically this is what I need to do , right ? could you help me to print $fname inside the UPDATE.

I think if there is a way then I can use it in that original form too.

[php]

Untitled Document

<?php if(isset($_POST['submit'])) { global $fnames; $fname=$_POST['fname']; echo ''; } if(isset($_POST['go'])) { $go=$_POST['go']; echo $go; echo $fnames; } [/php]

You don’t need this statement, unless you’re using it in some other page.

[php]global $fnames;[/php]

MOVE:

[php]$fname=$_POST[‘fname’];[/php]

To above here:

[php]if(isset($_POST[‘submit’]))[/php]

Rename:

[php]echo $fnames;[/php]

to

[php]echo $fname;[/php]

Like below.

[php]

Untitled Document

<?php $fname=$_POST['fname']; if(isset($_POST['submit'])) { echo ''; } if(isset($_POST['go'])) { $go=$_POST['go']; echo $go; echo $fname; } ?>[/php]
Sponsor our Newsletter | Privacy Policy | Terms of Service