Page 1 of 1

$_GET Returning NULL

Posted: Thu Mar 06, 2008 3:36 pm
by PastorHank
This is the code I use to choose from

Code: Select all

while  ($row = mysql_fetch_array($result)) {
     extract($row);
     $vehicletouse=$vin_number;
     $webfront='emailorder.php?d=';
     $getemailorder=$webfront.$vehicletouse;
     $imagelocation='../carimages/';
 
    if (empty($pathtophoto)){
        $pathtophoto="noimagefound1.jpg";
    }
 
     $finalimage=$imagelocation.$pathtophoto; 
 
 echo "<tr>\n
        <td align='center' bgcolor='#DEB887' width='200'><b>Vehicle</b></td>
        <td align='center' bgcolor='#DEB887' width='100'><b>Year</b></td>
        <td align='center' bgcolor='#DEB887' width='100'><b>Make</b></td>
        <td align='center' bgcolor='#DEB887' width='125'><b>Model</b></td>
        <td align='center' bgcolor='#DEB887' width='125'><b>Color</b></td>
        <td align='center' bgcolor='#DEB887' width='150'><b>Vin Number</b></td>
        </tr>";
 echo "<tr>\n
        <td align='center' width='200' bgcolor='#FFFF00'><a href='$finalimage'><img border='0' src=\"".htmlspecialchars($finalimage)."\" width='200' height='150'></a></td>
        <td align='center' width='100' bgcolor='#FFFF00'>$year</td>
        <td align='center' width='100' bgcolor='#FFFF00'>$make</td>
        <td align='center' width='125' bgcolor='#FFFF00'>$model</td>
        <td align='center' width='125' bgcolor='#FFFF00'>$color</td>
        <td align='center' width='150' bgcolor='#FFFF00'><a href='$getemailorder'>$vin_number</a><br>Bid On This Vehicle</td>
        </tr>";
 echo "<tr><td colspan='6'><hr></td></tr>";
}
Everything is displaying correctly. When I click on the "$getemailorder" the program 'emailorder.php' uses

Code: Select all

$vehicle=$_GET['vehicletouse']; 
 
When I use var_dump is shows $vehicle is either NULL or an empty string
What have I missed?
TIA

Re: $_GET Returning NULL

Posted: Thu Mar 06, 2008 3:53 pm
by PastorHank
Disregard. I found the problem. I was using the wrong variable name.