How can you get the variables in URL to the next page in PHP?
The user is at the URL
http://localhost/codes/index.php?ask_question&[email protected]&passhash_md5=202cb962ac59075b964b07152d234b70
He sends a question and he goes to the following url where variables lost their values for some unknown reason.
http://localhost/codes/index.php?question_sent&email=&passhash_md5=
The following code is the code *handle_a_new_question.php*.
$result = pg_prepare($dbconn, "query77", "INSERT INTO questions
(body, title, users_user_id)
VALUES ($1, $2, $3);");
$result = pg_execute($dbconn, "query77", array($body, $title, $user_id));
if(isset($result)) {
$header = ("Location: /codes/index.php?"
. "question_sent"
. "&"
. "email="
. $_GET['email'] // this seems to be correct to me
. "&"
. "passhash_md5="
. $_GET['passhash_md5'] // this seems to be correct to me too
);
header($header);
}
Do you see any mistake in the code?