kathymack Posted September 17, 2013 Share Posted September 17, 2013 Hi I have created the following job search form: http://career-updates.org/jobs-new/final-jobs2.php?num_days_back=30&fname=Damian&lname=Saez&radius=25&zip=90210&job=customer-service&what=customer-service&where=90210If you click any of the buttons on the right side, the job search is rendereing properly. However if you enter a what and where and click find jobs in the top right area, it is not grabbing the right form data even though the url is updated to reflect the new data. I have tried everything I can think of to fix this issue, but it's just not working. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/282223-on-form-submit-not-reading-in-values/ Share on other sites More sharing options...
jazzman1 Posted September 17, 2013 Share Posted September 17, 2013 Well, we are not crystal-gazers Where is your code? Quote Link to comment https://forums.phpfreaks.com/topic/282223-on-form-submit-not-reading-in-values/#findComment-1449877 Share on other sites More sharing options...
kathymack Posted September 17, 2013 Author Share Posted September 17, 2013 oh sorry I thought I attached it here is a link : http://career-updates.org/jobs-new/test-email.txt Quote Link to comment https://forums.phpfreaks.com/topic/282223-on-form-submit-not-reading-in-values/#findComment-1449882 Share on other sites More sharing options...
cyberRobot Posted September 17, 2013 Share Posted September 17, 2013 Could you copy and paste the applicable code inside the forum message? Please surround the code with tags to make it easier to read. Quote Link to comment https://forums.phpfreaks.com/topic/282223-on-form-submit-not-reading-in-values/#findComment-1449888 Share on other sites More sharing options...
kathymack Posted September 17, 2013 Author Share Posted September 17, 2013 <?php $sPath_Step3e = "http://career-updates.org/jobs-new/final-jobs2.php?fname=$sFName&lname=$sLName&job=$sJobTitle&zip=$sZip&radius=$iRadius&num_days_back=$sDaysBack"; /****************************************************************************/ /* (1a) GET VARS */ /****************************************************************************/ $sFName = $_GET["fname"]; $sLName = $_GET["lname"]; $sJobTitle = $_GET["job"]; $sZip = $_GET["zip"]; $sWhat = $_GET['what']; $sWhere = $_GET['where']; $sTodaysDate = date("F j, Y"); $sFullName = $sFName . " " . $sLName; $sDaysBack = $_GET["num_days_back"]; $iRadius = $_GET["radius"]; if (! isset($sDaysBack)) { $sDaysBack = 30; } if (! isset($iRadius)) { $iRadius = 25; } $iLimit = 10; $iLatLong = 1; $sPubKey = "216811061177745"; $sSort = "date"; $sUseragent = $_SERVER["HTTP_USER_AGENT"]; $sIPaddress = $_SERVER["REMOTE_ADDR"]; /****************************************************************************/ /* (9) DISPLAY PAGE */ /****************************************************************************/ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Career Updates</title> <link rel="stylesheet" href="css/styles_final.css" type="text/css" /> <script type="text/javascript" src="js/functions.js"></script> <script type="text/javascript" src="js/new-validate.js"></script> <script type="text/javascript" language="javascript"> <!-- PreLoad Wait - Script --> <!-- This script and more from http://www.rainbow.arch.scriptmania.com function waitPreloadPage() { //DOM if (document.getElementById){ document.getElementById('prepage').style.visibility='hidden'; }else{ if (document.layers){ //NS4 document.prepage.visibility = 'hidden'; } else { //IE4 document.all.prepage.style.visibility = 'hidden'; } } } // End --> </script> </head> <body onLoad="waitPreloadPage();"> <div id="main"> </div> <div id="wrapper"> <div id="header"> <img src="images/logo.png" style="float:left;margin-left:10px;margin-top:6px;" /> <div id="whatwhere"> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <table border='0' cellspacing='1' style='font-family:arial;' width="370"> <tr><td style='font-size:16px;color:#3d3d3d'><b>what</b></td> <td style='font-size:16px;color:#3d3d3d'><b>where</b> </td> </tr> <tr><td><input type="text" name="what" style="color:#666;"></td> <td><input type="text" name="where" style="color:#666;"></td> </tr> <tr><td valign='top' style='font-size:10px'>job title, keywords or company</td> <td valign='top' style='font-size:10px;padding:0px;margin:0px;border:0px;' > <table border='0' cellpadding='1' width='100%' style='padding:0px;margin:0px;border:0px;'> <tr><td valign='top' style='font-size:10px;padding:0px;margin:0px;border:0px;'>zip only</td> </tr> </table></td></tr> </td></tr></table> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <div style='margin-left:380px;margin-top:-40px;'> <input id='txtSearchBtn' type='image' value='Find Jobs' onclick="return ValidateWhatWhere();" src="images/btn_searchsmall.png"> </div> </form> </div> <div id="header2"> <table width='920' border='0'> <tr> <td colspan='2' align='left'> <table border='0' width='920'> <tr style='font-family:Arial;font-size:12px;font-weight:normal;color:DimGray;'> <td width='260'> Search Results: <? print($sFullName); ?> </td> <td align='right' style='font-family:Arial;font-size:12px;font-weight:normal;color:DimGray;'> </td> </tr> <tr> <td colspan='2'> </td> </tr></table> </td> </tr></table> </div> </div> <!-- MAIN CONTAINER --> <div id="container"> <!-- LEFT SIDE --> <div id="side-a"> <div style="margin-left:10px;margin-top:10px;"> <h2>Days Back</h2> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="num_days_back" value=3> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere);?>" > <input type="submit" value="" style="background-image: url(images/btn3DaysBack.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="num_days_back" value=7> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn7DaysBack.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="num_days_back" value=14> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn14DaysBack.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="num_days_back" value=30> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn30DaysBack.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="num_days_back" value="60"> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn60DaysBack.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="num_days_back" value=90> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn90DaysBack.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <p> </p> <h2>Search Radius</h2> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="radius" value="5"> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn5Radius.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="radius" value="10"> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn10Radius.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="radius" value="25"> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn25Radius.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="radius" value="50" style="border-style:none;"> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn50Radius.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="radius" value="100"> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn100Radius.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <p> </p> <h2>Popular</h2> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <?php $sWhat = "customer-service"; $sWhere = $sZip; ?> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="job" value="customer-service"> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btnChannelCS.jpg);width:110px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <?php $sWhat = "warehouse"; $sWhere = $sZip; ?> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="job" value="warehouse"> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btnChannelWH.jpg);width:110px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <?php $sWhat = "data-entry"; $sWhere = $sZip; ?> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="job" value="data-entry"> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btnChannelDE.jpg);width:110px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <?php $sWhat = "driver"; $sWhere = $sZip; ?> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="job" value="driver"> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btnChannelDR.jpg);width:110px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <?php $sWhat = "human-resources"; $sWhere = $sZip; ?> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="job" value="human-resources"> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btnChannelHR.jpg);width:110px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <?php $sWhat = "health-care"; $sWhere = $sZip; ?> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="job" value="health-care"> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btnChannelHC.jpg);width:110px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <?php $sWhat = "sales-associate"; $sWhere = $sZip; ?> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="job" value="sales-associate"> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btnChannelSA.jpg);width:110px;height:21px;border:none;cursor: pointer;"> </form> </div> </div> <!-- MIDDLE COLUMN --> <div id="content"> <div style="margin-left:10px;"> <br/><br/> <div id="prepage" style="position:center;margin-top:24px;font-family:Arial;font-size:16px;color:darkred;font-weight:bold;"> Please wait <?php print ($sFName); ?>... Your <?php print ("your"); ?> results are being loaded... </div> <div style="margin-top:-44px;"> <?php $searchString = "http://api.indeed.com/ads/apisearch?"; $searchString .= "q=" . $sJobTitle ."&l=" . $sZip ." &format=xml"; $searchString .= "&limit=".$iLimit ."&latlong=".$iLatLong ."&radius=".$iRadius ."&fromage=".$sDaysBack ."&sort=".$sSort; $searchString .= "&publisher=".$sPubKey."&userip=".$sIPaddress."&useragent=".$sUseragent . "&jpp=" . $iLimit; $xml = simplexml_load_file($searchString) or die ("Unable to load XML file!"); $iTotalResults = $xml->totalresults; print ("<span class='StdText'>Total Jobs: $iTotalResults</span><br/><br/>"); ?> <h2 align="left" style="margin-top: 4px;"> <?php print ("<br/>$sFName here are your $sJobTitle openings near $sZip!"); ?> </h2> <?php if ($iTotalResults > 0) { print ("<table border='0' width='700'>"); foreach ($xml->results->result as $result) { $jobkey = (string)$result->jobkey; $jobTitle = (string)$result->jobtitle; $company = (string)$result->company; $location = (string)$result->city . ", " . (string)$result->state; $postedDate = (string)$result->date; $snippet = (string)$result->snippet; $link = (string)$result->url; $sTempHref = "<a class='job' onmousedown=\"indeed_clk(this,'$jobkey')\" "; $sTempHref .= " href=" . "'" . $link . "'>"; $sTempHref .= $jobTitle . "</a>"; $TheJobs[] = array( 'jobkey' => $jobkey, 'Title' => $sTempHref, 'Company' => $company, 'Location' => $location, 'PDate' => $postedDate, 'Desc' => $snippet, 'ButtonLink' => $link ); $company = preg_replace('/[^(\x20-\x7F)]*/','', $company); $sTempHref = preg_replace('/[^(\x20-\x7F)]*/','', $sTempHref); $snippet = preg_replace('/[^(\x20-\x7F)]*/','', $snippet); print ("<tr>"); print ("<td>"); print ("$sTempHref<br/>"); print ("<span class='StdText'>$company, $location</span><br/>"); print ("<span class='StdTextLight'>$postedDate</span><br/>"); print ("<span class='StdText'>$snippet</span><br/><br/>"); } print ("</td></tr></table>"); } else { print ("<span class='StdText'>No jobs found matching thhe search criteria</span>"); } ?> </div> </div> </div> <!-- RIGHT COLUMN --> <div id="side-b"> <div style='margin-left:20px;margin:top:0px;' align='right' valign='top'> hidden content </div> </div> </div> <div id="footer"> </div> </div> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/282223-on-form-submit-not-reading-in-values/#findComment-1449891 Share on other sites More sharing options...
jazzman1 Posted September 17, 2013 Share Posted September 17, 2013 (edited) In all others forms you are using <input type="submit"> but in this one the type is <input type="image"> Try to change(just for test) to <input type="submit"> What's your testing browser? Check this out -> https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input Edited September 17, 2013 by jazzman1 Quote Link to comment https://forums.phpfreaks.com/topic/282223-on-form-submit-not-reading-in-values/#findComment-1449893 Share on other sites More sharing options...
kathymack Posted September 17, 2013 Author Share Posted September 17, 2013 Hi I have changed the code as suggested. It's still not working <?php $sPath_Step3e = "http://career-updates.org/jobs-new/test-email.php?fname=$sFName&lname=$sLName&job=$sJobTitle&zip=$sZip&radius=$iRadius&num_days_back=$sDaysBack"; /****************************************************************************/ /* (1a) GET VARS */ /****************************************************************************/ $sFName = $_GET["fname"]; $sLName = $_GET["lname"]; $sJobTitle = $_GET["job"]; $sZip = $_GET["zip"]; $sWhat = $_GET['what']; $sWhere = $_GET['where']; $sTodaysDate = date("F j, Y"); $sFullName = $sFName . " " . $sLName; $sDaysBack = $_GET["num_days_back"]; $iRadius = $_GET["radius"]; if (! isset($sDaysBack)) { $sDaysBack = 30; } if (! isset($iRadius)) { $iRadius = 25; } $iLimit = 10; $iLatLong = 1; $sPubKey = "216811061177745"; $sSort = "date"; $sUseragent = $_SERVER["HTTP_USER_AGENT"]; $sIPaddress = $_SERVER["REMOTE_ADDR"]; /****************************************************************************/ /* (9) DISPLAY PAGE */ /****************************************************************************/ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Career Updates</title> <link rel="stylesheet" href="css/styles_final.css" type="text/css" /> <script type="text/javascript" src="js/functions.js"></script> <script type="text/javascript" src="js/new-validate.js"></script> <script type="text/javascript" language="javascript"> <!-- PreLoad Wait - Script --> <!-- This script and more from http://www.rainbow.arch.scriptmania.com function waitPreloadPage() { //DOM if (document.getElementById){ document.getElementById('prepage').style.visibility='hidden'; }else{ if (document.layers){ //NS4 document.prepage.visibility = 'hidden'; } else { //IE4 document.all.prepage.style.visibility = 'hidden'; } } } // End --> </script> </head> <body onLoad="waitPreloadPage();"> <div id="main"> </div> <div id="wrapper"> <div id="header"> <img src="images/logo.png" style="float:left;margin-left:10px;margin-top:6px;" /> <div id="whatwhere"> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <table border='0' cellspacing='1' style='font-family:arial;' width="370"> <tr><td style='font-size:16px;color:#3d3d3d'><b>what</b></td> <td style='font-size:16px;color:#3d3d3d'><b>where</b> </td> </tr> <tr><td><input type="text" name="what" style="color:#666;"></td> <td><input type="text" name="where" style="color:#666;"></td> </tr> <tr><td valign='top' style='font-size:10px'>job title, keywords or company</td> <td valign='top' style='font-size:10px;padding:0px;margin:0px;border:0px;' > <table border='0' cellpadding='1' width='100%' style='padding:0px;margin:0px;border:0px;'> <tr><td valign='top' style='font-size:10px;padding:0px;margin:0px;border:0px;'>zip only</td> </tr> </table></td></tr> </td></tr></table> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <div style='margin-left:380px;margin-top:-40px;'> <input type="submit" value="" style="background-image: url(images/btn_searchsmall.png);width:87px;height:22px;border:none;cursor: pointer;"> </div> </form> </div> <div id="header2"> <table width='920' border='0'> <tr> <td colspan='2' align='left'> <table border='0' width='920'> <tr style='font-family:Arial;font-size:12px;font-weight:normal;color:DimGray;'> <td width='260'> Search Results: <? print($sFullName); ?> </td> <td align='right' style='font-family:Arial;font-size:12px;font-weight:normal;color:DimGray;'> </td> </tr> <tr> <td colspan='2'> </td> </tr></table> </td> </tr></table> </div> </div> <!-- MAIN CONTAINER --> <div id="container"> <!-- LEFT SIDE --> <div id="side-a"> <div style="margin-left:10px;margin-top:10px;"> <h2>Days Back</h2> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="num_days_back" value=3> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere);?>" > <input type="submit" value="" style="background-image: url(images/btn3DaysBack.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="num_days_back" value=7> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn7DaysBack.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="num_days_back" value=14> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn14DaysBack.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="num_days_back" value=30> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn30DaysBack.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="num_days_back" value="60"> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn60DaysBack.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="num_days_back" value=90> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn90DaysBack.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <p> </p> <h2>Search Radius</h2> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="radius" value="5"> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn5Radius.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="radius" value="10"> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn10Radius.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="radius" value="25"> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn25Radius.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="radius" value="50" style="border-style:none;"> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn50Radius.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <input type="hidden" name="radius" value="100"> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="job" value=<?php print($sJobTitle); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btn100Radius.jpg);width:102px;height:21px;border:none;cursor: pointer;"> </form> <p> </p> <h2>Popular</h2> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <?php $sWhat = "customer-service"; $sWhere = $sZip; ?> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="job" value="customer-service"> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btnChannelCS.jpg);width:110px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <?php $sWhat = "warehouse"; $sWhere = $sZip; ?> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="job" value="warehouse"> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btnChannelWH.jpg);width:110px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <?php $sWhat = "data-entry"; $sWhere = $sZip; ?> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="job" value="data-entry"> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btnChannelDE.jpg);width:110px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <?php $sWhat = "driver"; $sWhere = $sZip; ?> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="job" value="driver"> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btnChannelDR.jpg);width:110px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <?php $sWhat = "human-resources"; $sWhere = $sZip; ?> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="job" value="human-resources"> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btnChannelHR.jpg);width:110px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <?php $sWhat = "health-care"; $sWhere = $sZip; ?> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="job" value="health-care"> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btnChannelHC.jpg);width:110px;height:21px;border:none;cursor: pointer;"> </form> <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> <?php $sWhat = "sales-associate"; $sWhere = $sZip; ?> <input type="hidden" name="num_days_back" value=<?php print($sDaysBack); ?>> <input type="hidden" name="fname" value=<?php print($sFName); ?>> <input type="hidden" name="lname" value=<?php print($sLName); ?>> <input type="hidden" name="radius" value=<?php print($iRadius); ?>> <input type="hidden" name="zip" value=<?php print($sZip); ?>> <input type="hidden" name="job" value="sales-associate"> <input type="hidden" name="what" value="<?php print($sWhat); ?>" > <input type="hidden" name="where" value="<?php print($sWhere); ?>" > <input type="submit" value="" style="background-image: url(images/btnChannelSA.jpg);width:110px;height:21px;border:none;cursor: pointer;"> </form> </div> </div> <!-- MIDDLE COLUMN --> <div id="content"> <div style="margin-left:10px;"> <br/><br/> <div id="prepage" style="position:center;margin-top:24px;font-family:Arial;font-size:16px;color:darkred;font-weight:bold;"> Please wait <?php print ($sFName); ?>... Your <?php print ("your"); ?> results are being loaded... </div> <div style="margin-top:-44px;"> <?php $searchString = "http://api.indeed.com/ads/apisearch?"; $searchString .= "q=" . $sJobTitle ."&l=" . $sZip ." &format=xml"; $searchString .= "&limit=".$iLimit ."&latlong=".$iLatLong ."&radius=".$iRadius ."&fromage=".$sDaysBack ."&sort=".$sSort; $searchString .= "&publisher=".$sPubKey."&userip=".$sIPaddress."&useragent=".$sUseragent . "&jpp=" . $iLimit; $xml = simplexml_load_file($searchString) or die ("Unable to load XML file!"); $iTotalResults = $xml->totalresults; print ("<span class='StdText'>Total Jobs: $iTotalResults</span><br/><br/>"); ?> <h2 align="left" style="margin-top: 4px;"> <?php print ("<br/>$sFName here are your $sJobTitle openings near $sZip!"); ?> </h2> <?php if ($iTotalResults > 0) { print ("<table border='0' width='700'>"); foreach ($xml->results->result as $result) { $jobkey = (string)$result->jobkey; $jobTitle = (string)$result->jobtitle; $company = (string)$result->company; $location = (string)$result->city . ", " . (string)$result->state; $postedDate = (string)$result->date; $snippet = (string)$result->snippet; $link = (string)$result->url; $sTempHref = "<a class='job' onmousedown=\"indeed_clk(this,'$jobkey')\" "; $sTempHref .= " href=" . "'" . $link . "'>"; $sTempHref .= $jobTitle . "</a>"; $TheJobs[] = array( 'jobkey' => $jobkey, 'Title' => $sTempHref, 'Company' => $company, 'Location' => $location, 'PDate' => $postedDate, 'Desc' => $snippet, 'ButtonLink' => $link ); $company = preg_replace('/[^(\x20-\x7F)]*/','', $company); $sTempHref = preg_replace('/[^(\x20-\x7F)]*/','', $sTempHref); $snippet = preg_replace('/[^(\x20-\x7F)]*/','', $snippet); print ("<tr>"); print ("<td>"); print ("$sTempHref<br/>"); print ("<span class='StdText'>$company, $location</span><br/>"); print ("<span class='StdTextLight'>$postedDate</span><br/>"); print ("<span class='StdText'>$snippet</span><br/><br/>"); } print ("</td></tr></table>"); } else { print ("<span class='StdText'>No jobs found matching thhe search criteria</span>"); } ?> </div> </div> </div> <!-- RIGHT COLUMN --> <div id="side-b"> <div style='margin-left:20px;margin:top:0px;' align='right' valign='top'> </div> </div> </div> <div id="footer"> </div> </div> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/282223-on-form-submit-not-reading-in-values/#findComment-1449898 Share on other sites More sharing options...
jazzman1 Posted September 17, 2013 Share Posted September 17, 2013 I hardly see, where are you passing the $sWhat and $sWhere to the $searchString variable? Quote Link to comment https://forums.phpfreaks.com/topic/282223-on-form-submit-not-reading-in-values/#findComment-1449912 Share on other sites More sharing options...
kathymack Posted September 17, 2013 Author Share Posted September 17, 2013 <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> Quote Link to comment https://forums.phpfreaks.com/topic/282223-on-form-submit-not-reading-in-values/#findComment-1449913 Share on other sites More sharing options...
jazzman1 Posted September 17, 2013 Share Posted September 17, 2013 <form name="Form1" action="<?php print($sPath_Step3e); ?>" method="get"> That's fine. I saw you're defined them in the php action file. The part that I don't understand is how do you pass those two variables to the $searchString variable? I don't see any of them here. $searchString = "http://api.indeed.com/ads/apisearch?"; $searchString .= "q=" . $sJobTitle ."&l=" . $sZip ." &format=xml"; $searchString .= "&limit=".$iLimit ."&latlong=".$iLatLong ."&radius=".$iRadius ."&fromage=".$sDaysBack ."&sort=".$sSort; $searchString .= "&publisher=".$sPubKey."&userip=".$sIPaddress."&useragent=".$sUseragent . "&jpp=" . $iLimit; Quote Link to comment https://forums.phpfreaks.com/topic/282223-on-form-submit-not-reading-in-values/#findComment-1449917 Share on other sites More sharing options...
fastsol Posted September 17, 2013 Share Posted September 17, 2013 You need to move this line lower in the code to after where you define all the variables in it. Right now you have this at the top before any variables are defined giving this whole string no values. $sPath_Step3e = "http://career-updates.org/jobs-new/test-email.php?fname=$sFName&lname=$sLName&job=$sJobTitle&zip=$sZip&radius=$iRadius&num_days_back=$sDaysBack"; Quote Link to comment https://forums.phpfreaks.com/topic/282223-on-form-submit-not-reading-in-values/#findComment-1449918 Share on other sites More sharing options...
Solution kathymack Posted September 17, 2013 Author Solution Share Posted September 17, 2013 You need to move this line lower in the code to after where you define all the variables in it. Right now you have this at the top before any variables are defined giving this whole string no values. $sPath_Step3e = "http://career-updates.org/jobs-new/test-email.php?fname=$sFName&lname=$sLName&job=$sJobTitle&zip=$sZip&radius=$iRadius&num_days_back=$sDaysBack"; Thank you everyone - it is solved. Quote Link to comment https://forums.phpfreaks.com/topic/282223-on-form-submit-not-reading-in-values/#findComment-1449924 Share on other sites More sharing options...
jazzman1 Posted September 17, 2013 Share Posted September 17, 2013 @kathymack, sometimes the answer is right in front of our eyes. So, in the future, the best practice is to turn on php error_reporting functions on the top of these problematic files. Good observation @fastsol Quote Link to comment https://forums.phpfreaks.com/topic/282223-on-form-submit-not-reading-in-values/#findComment-1449940 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.