Posted by Hilarion on 11/15/05 18:37
> echo"<form name=\"reset_database\" method=\"post\" action=\"<? $PHP_SELF
> ?>\">
The line above will give wrong results (or causes parse error). Replace it
with something like:
echo '<form name="reset_database" method="post" action="';
echo htmlspecialchars( $_SERVER['PHP_SELF'] );
echo '">';
// next lines should be also echoed
or something like:
?>
<form name="reset_database" method="post"
action="<?php echo htmlspecialchars( $_SERVER['PHP_SELF'] ); ?>">
<!-- next lines -->
<?php
// PHP code here
> <center><input type=\"submit\" name=\"enter_data\" value=\"Reset database
> after printing\"></center>
> </form>";
> if ($enter_data) {
> $sql = "UPDATE cubecartstore_order_inv SET order_from_supplier = '0'";
> }
You should also place this at the very start of your script:
error_reporting( E_ALL );
and use all database error reporting functions in all possible places.
The code seems to be incomplete. You did not use any database functions
nor did you use your $sql variable in any way. Post the complete
script or better strip your script to the form which is complete
(should perform the action you want) but still does not behave the
way you want it to (you should test it) and post the stripped script.
Hilarion
Navigation:
[Reply to this message]
|