Jump to content

[SOLVED] _get var undefined error


zapdbf

Recommended Posts

i am getting "Undefined variable: _get in" error

 

Here is the calling page

<?

$host= 'localhost:3306';

    $dbName= 'zapdbfco_main';

    $user= 'zapdbfco_xuser';

    $pass= 'xuser';

    $conn= mysql_connect($host,$user,$pass) or die(mysql_error());

    $db= mysql_select_db($dbName,$conn) or die(mysql_error());

    $NewQuizTitle= $_POST['title'];

   

    $sql= " insert into  tblQuizHead  (Title) values('{$NewQuizTitle}')";

   

      $result= mysql_query($sql,$conn) or die(mysql_error());

      $sql= 'select max(ident) as idt from tblQuizHead';

   

      $result= mysql_query($sql,$conn) or die(mysql_error());

      $data= mysql_fetch_array($result);

    header("Location: enterq.php?d={$data['idt']}");

     

      exit();

        ?>

 

 

 

 

here is the destination page

 

 

<?php

    $host= 'localhost:3306';

    $dbName= 'zapdbfco_main';

    $user= 'zapdbfco_xuser';

    $pass= 'xuser';

    $Ident = $_get['d'];  <<<< error is here >>>>>

    $conn= mysql_connect($host,$user,$pass) or die(mysql_error());

    $db= mysql_select_db($dbName,$conn) or die(mysql_error());

    $sql = "select Title form tblquizhead where ident = {$ident}";

    $result = mysql_query($sql,$conn);

    $data = mysql_fetch_array($result);

    echo " Quiz Name: {$data['Title']}";

    echo "<input type=hidden name=qnum value={$ident}>";

   

?>

 

 

<form method="post" action="pquest.php">

Question  <textarea name="question" rows="3" cols="40"></textarea><br><br>

answer 1  <textarea name="a1" rows="3" cols="30"></textarea> <input type="radio" name="correcta" value="1"><br>

answer 2  <textarea name="a2" rows="3" cols="30"></textarea> <input type="radio" name="correcta" value="2"><br>

answer 3  <textarea name="a3" rows="3" cols="30"></textarea> <input type="radio" name="correcta" value="3"><br>

answer 4  <textarea name="a4" rows="3" cols="30"></textarea> <input type="radio" name="correcta" value="4"><br>

answer 5  <textarea name="a5" rows="3" cols="30"></textarea> <input type="radio" name="correcta" value="5"> <br>

answer 6  <textarea name="a6" rows="3" cols="30"></textarea> <input type="radio" name="correcta" value="6"><br>

<input type="submit" value = "Add Another"> <input type="submit" value = "Done">  <input type="reset">

</form>

 

 

Why am i getting this error i am passing a form query string ?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.