Hello all...
I have some problems with the following code.
function insertactor ( $val2, $val3 ) {
$actor_name = "actor_name";
$actor_sur = "actor_sur";
$sqlinsertactor = "INSERT INTO actor ($actor_name, $actor_sur) VALUES ( $val2, $val3 )";
echo $sqlinsertactor;
if ( ($val2 == "") || ($val3 == "" ) ) {
echo "Where is val2 or val3?";
exit;
}
$new = @mysql_db_query($dbname1, $sqlinsertactor);
if (!$new) {
echo ("<br><br><center>Query cannot be executed.</center>");
exit();
}
}
insertactor( "Hello", "World" );
I dont know what the problem is... I execute the query from outside the function and it work... but once i execute insertactor function... all i get is Query cannot be executed...
Could someone please help me?
Thank you
George
I have some problems with the following code.
function insertactor ( $val2, $val3 ) {
$actor_name = "actor_name";
$actor_sur = "actor_sur";
$sqlinsertactor = "INSERT INTO actor ($actor_name, $actor_sur) VALUES ( $val2, $val3 )";
echo $sqlinsertactor;
if ( ($val2 == "") || ($val3 == "" ) ) {
echo "Where is val2 or val3?";
exit;
}
$new = @mysql_db_query($dbname1, $sqlinsertactor);
if (!$new) {
echo ("<br><br><center>Query cannot be executed.</center>");
exit();
}
}
insertactor( "Hello", "World" );
I dont know what the problem is... I execute the query from outside the function and it work... but once i execute insertactor function... all i get is Query cannot be executed...
Could someone please help me?
Thank you
George