$_GET Returning NULL

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
PastorHank
Forum Contributor
Posts: 117
Joined: Sat Jun 03, 2006 7:58 am
Location: Texas Hill Country

$_GET Returning NULL

Post 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
PastorHank
Forum Contributor
Posts: 117
Joined: Sat Jun 03, 2006 7:58 am
Location: Texas Hill Country

Re: $_GET Returning NULL

Post by PastorHank »

Disregard. I found the problem. I was using the wrong variable name.
Post Reply