input SQL data through text box and get nothing?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I want to add SQL command through a textbox in the form using post
method,but when i execute the following file, nothing is added to the
I can add
     $sqlol = "update  acc_account
        set user_name='k'
      where accountid=1";
to the database if it was added to the file but when i use $result =
mysql_query($sql); which execute the query, it get nothing. However,
the $sql statement do print out on the screen using  print.

Any idea?

$conn=mysql_connect('localhost', 'shytr8');

{print "Error- Could not connect to MYSQL";


    print "Error- Could not create er";
    $query  = "CREATE DATABASE test";

$result = mysql_query($sql);    

Re: input SQL data through text box and get nothing? wrote:
Quoted text here. Click to load it

What's the result from mysql_query?

   if (!$result)
     echo mysql_error();

Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.

Site Timeline