thaaaaaaaaanks u installer
it works almost perfect
wonder if there is a workaround about the
$_SERVER['HTTP_REFERER'] to do this:
as i can see it redirects to the thankyou.html page located
at www.domain.com/thankyou.html from where
the form was submitted, but if the form is located at
domain.com/folder/form.html it should redirect to
domain.com/folder/thankyou.html
what i mean is how to reach the folder where the form is located
in order to redirect to a thankyou page located in the same folder
and the very last question:
someone helped me with the fopen before saying to add a string
in order to check if the userid is already taken, then add a
number after it in order to resubmit with an alternative one
i got this code to do that:
{
$fp = fopen('http://url?email=blah&the_rest=blah', 'r');
$result = fread($fp, 8192);
fclose($fp);
if (strstr($result, 'fail'))
{
if (strstr($result, 'duplicate user'))
$userid .= rand(0, 9);
}
} while (strstr($result, 'duplicate user'));
what i did is trying to implement this with the curl u suggested before doing this:
$ch = curl_init();
{
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$curl = curl_exec($ch);
curl_close($ch);
if (strstr($result, 'fail'))
{
if (strstr($result, 'duplicate user'))
$userid .= rand(0, 9);
}
} while (strstr($result, 'duplicate user'));
as u can see i just tried to clone it in the curl thing but im almost
sure i had missing something , in fact i dont know if this can be
done with this code, just tried with my almost zero php skills (u
noticed :queasy: )
btw, "duplicate user" is the error the external file replies if a user
id already exists
any idea? (it will be the last, hope ) 😉 😉