-
Posts
1,943 -
Joined
-
Last visited
Never
Posts posted by discomatt
-
-
I'm no mysql guru, but try escapting all mysql field names. Sometimes you can be using a reserved name without knowing it
$query = mysql_query("
UPDATE `user` SET `password1` = MD5('" . mysql_escape_string($password1) . "'), `password2` = MD5('" . mysql_escape_string($password2) . "')
WHERE `emailaddress1` = '" . $_SESSION['sessioname'] . "'
");
-
do {
$randomname = sha1(uniqid(rand(), true)) . $extension;
} while (file_exists($randomname));
-
Sessions is the easiest way. You can also dynamically generate hidden form fields to achieve this as well
-
Nix or Win server? Is this a pre-built php script, or something you've coded yourself?
-
That's got me stumped. According to the php manual, the function returns as such
Returns TRUE if the mail was successfully accepted for delivery, FALSE otherwise. -
-
$cur['day'] = date('j');
$cur['month'] = date('n');
$cur['year'] = date('y');
That will fill it with the server's day/month/year at the moment of execution
-
The ! before the function can pretty much be equated to == FALSE;
so
if (!function()) is the same as if (function() == FALSE)
Be careful though... ! checks for both FALSE and 0.. so if your function returns a numeric value, and there's a chance it might be 0, be sure to use
if (function() === FALSE)
-
double post... delete sorry
-
Lost a bit of data with the downfall... as I said before PHP doesn't have permission to create/write the file in the directory your are specifying. Try using an absolute path, and make sure the folder exists.
How do I get a value from a disabled textbox?
in PHP Coding Help
Posted
I'm not enitrely sure of the inner workings, but a quick-fix would be to have javascript handle the submit for you...
When the submit button is pressed, trigger a javascript function that re-enables the field then submits the form.