I have a strange problem, have no Idea where to look in manual for answer hope the gurus of PHP can help.
The Problem:
I am creating a 2 variables from a <input type="text">
**********form 1 create variables**************
<form ENCTYPE="multipart\form-data" method="post" action="form_test_2.php">
<input type="text" name="variable_1">
<input type="text" name="variable_2">
<input type="submit">
Once I press submit the created variables go to form 2, Inside of form 2 the variables are inserted into <input type="hidden"> for processing to final script
**********form 2 pass variables to final script for DB insert**************
<form ENCTYPE="multipart\form-data" method="post" action="test_update.php">
<input type="hidden" name="variable_1" value="<?echo variable_1?>">
<input type="hidden" name="variable_2" value="<? echo $variable_2?>">
In the final script PHP should INSERT these variables into the database via SQL
************final script*************
$variable_clean=stripslashes($variable_1);
mssql_query("INSERT INTO temp_approval (document_title, document_number)
VALUES ('$variable_clean', '$variable_2')
");
*****************conclusion************
everything works fine unless the variable contains quotation marks "", If the variable contains these quotes the database inserts empty value into the data field in the DB
**************specs*****************
I am using PHP 4.02, MSSQL Server 7.0
Whats the problem?
Thanks