Mysql insert with php not working
Trying to insert an ALBUM but not working. Please help me .
$CON =mysql_connect ($hostname, $username, $password) ;
$ALBUMCOD = 5;
$ALBUMNAM =mysql_real_escape_string( $_POST['ALBUMNAM'] );
$IMAGEURL =mysql_real_escape_string( $_POST['IMAGEURL'] );
$SQLALBUM =" INSERT INTO ALBUM
$RESULTS = mysql_query( $SQLALBUM, $CON );
Change the query to this:
Also, you should look at using mysqli as the mysql library won't be around much longer.
Potential typo? mysql_real_escape_string( $_POST['ALBUMNAM'] );
Should it be: mysql_real_escape_string( $_POST['ALBUMNAME'] );?
no it is correct ALBUMNAM
Ah I see, did you do what Fou said?
it is working I forgot to put hidden variable
<input type="HIDDEN" name="COMMAND" value="APPEND">
in my form to call THE INSERT ROUTINE
|All times are GMT +1. The time now is 07:37 PM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.