Set page with URL param
Posted: Thu Nov 17, 2011 11:27 am
Hi,
I recently dloaded coding application for a survey.
And I wanted to test the coding for correctness, but have problems in displaying the 1st survey.
Here is the coding:
http://yourserver/survey.php?questionid=1
But i get the error msg "Please set a question id in the URL".? Is it possible to restrict the use of setting a value in the url from the server. The link below is where i found this coding. Is there something that is missing in the code?
http://www.devx.com/webdev/Article/27175/0/page/2
I recently dloaded coding application for a survey.
And I wanted to test the coding for correctness, but have problems in displaying the 1st survey.
Here is the coding:
// This page requires a URL parameter with the QuestionID. if(isset($_GET["QuestionID"])) $Qid = $_GET["QuestionID"]; else die("Please set a question id in the URL"); // $QText = $row[1];The coder has advised, to use this kind of url to call the page:
http://yourserver/survey.php?questionid=1
But i get the error msg "Please set a question id in the URL".? Is it possible to restrict the use of setting a value in the url from the server. The link below is where i found this coding. Is there something that is missing in the code?
http://www.devx.com/webdev/Article/27175/0/page/2