How can you get the variables in URL to the next page in PHP?
Kullanıcı URL'de olduğunu
http://localhost/codes/index.php?ask_question&email=masi@gmail.com&passhash_md5=202cb962ac59075b964b07152d234b70
Diye bir soru gönderir ve o değişkenler bazı bilinmeyen bir nedenle kendi değerlerini kaybetmiş aşağıdaki url gider.
http://localhost/codes/index.php?question_sent&email=&passhash_md5=
Aşağıdaki kodu * handle_a_new_question.php * kodudur.
$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?