BradleyBrokers Posted August 21, 2008 Share Posted August 21, 2008 A little help? I would like to make life a little easier for my website users. When a user clicks the "More Information" tab (see www.BradleyBrokers.com/clients.php ), I want the "Listing Code" to be automatically inserted into the form (see www.BradleyBrokers.com/missing.php ) so that a user does not have to remember the "Listing Code". This is a snipit from the submit "More Information" webpage: $Status[1]="<br><br><br>STATUS: Available<br> LISTING CODE: CousLincoln<br><span class='title'><a href=missing.html>MORE INFORMATION</a></span><img src='picts/arrow.gif' HEIGHT=15 WIDTH=15 alt='beer drinking'><br></div><div style='padding: 5px 0px 5px 15px; float:left; width:250px'></div>"; And, for example, I would like the LISTING CODE: CousLincoln to be inserted into the webform here: <INPUT TYPE="TEXT" NAME="Listing Code" SIZE="30" CLASS="shadeform"> <B>Listing Code*</B><BR><BR> I typically have 20-40 Listing Codes which change postion and get deleted with new ones added. Nothing static. I have put them into arrays for database use, but I cannot figure-out how to pass the info into the form. Any suggestions??? Quote Link to comment Share on other sites More sharing options...
ratcateme Posted August 21, 2008 Share Posted August 21, 2008 you could add a get value to the url so for the first one the url would be http://www.bradleybrokers.com/missing.php?code=Commissary then add this to missing.php <INPUT TYPE="TEXT" NAME="Listing Code" SIZE="30" CLASS="shadeform" value="<?=$_GET['code']?>"> <B>Listing Code*</B><BR><BR> Scott. Quote Link to comment Share on other sites More sharing options...
BradleyBrokers Posted August 21, 2008 Author Share Posted August 21, 2008 Hi Scott, So I understand, for each $Status (listings on the first webpage which triggers the form) I would change each $Status to look like this: $Status[1]="<br><br><br>STATUS: Available<br> LISTING CODE: CousLincoln<br><span class='title'> <a href=missing.php?code=Commessary>MORE INFORMATION</a></span><img src='picts/arrow.gif' HEIGHT=15 WIDTH=15 alt='beer drinking'><br></div><div style='padding: 5px 0px 5px 15px; float:left; width:250px'></div>"; and then add this to missing.php: <INPUT TYPE="TEXT" NAME="Listing Code" SIZE="30" CLASS="shadeform" value="<?=$_GET['code']?>"> <B>Listing Code*</B><BR><BR> Do I have it correct? ??? Quote Link to comment Share on other sites More sharing options...
ratcateme Posted August 21, 2008 Share Posted August 21, 2008 yep that looks fine to me Quote Link to comment Share on other sites More sharing options...
BradleyBrokers Posted August 21, 2008 Author Share Posted August 21, 2008 Thanks. I'll give it a try and mark this as solved. THANKS Quote Link to comment Share on other sites More sharing options...
BradleyBrokers Posted August 21, 2008 Author Share Posted August 21, 2008 Scott (or anyone) it is not working. I get a Parse error with this script: <INPUT TYPE="TEXT" NAME="Listing Code" SIZE="30" CLASS="shadeform" value="<?=$_GET['code']?>"> <B>Listing Code*</B><BR><BR> www.BradleyBroekrs.com/clients.php to the form at www.bradleybrokers.com/missing.php Any fixes? Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted August 21, 2008 Share Posted August 21, 2008 what is the parse error? i get no error copy/pasting that code. is there more code you aren't showing? Quote Link to comment Share on other sites More sharing options...
akitchin Posted August 21, 2008 Share Posted August 21, 2008 my guess is that short tags are not enabled on your server. if that's the case, you'll have to put in the long version: <?php echo $_GET['code']; ?> as opposed to the shorthand version you're currently using: <?=$_GET['code']?> Quote Link to comment Share on other sites More sharing options...
BradleyBrokers Posted August 21, 2008 Author Share Posted August 21, 2008 Thanks... I'll give it a try now and see what happens. I will report back eitehr way in 10 minutes. Quote Link to comment Share on other sites More sharing options...
BradleyBrokers Posted August 21, 2008 Author Share Posted August 21, 2008 There is code above and below this section: </TD></TR><TR><TD> Please enter only one "Listing Code"<br><br> </TD></TR><TR><TD> <INPUT TYPE="TEXT" NAME="Listing Code" SIZE="30" CLASS="shadeform" value="<?PHP=$_GET['code']?>"> <B>Listing Code*</B><BR><BR> </TD></TR><TR><TD> The parse error is this: Parse error: parse error in /home/www/bradleybrokers/missing.php on line 121 I gave <?PHP and <? both a try. Quote Link to comment Share on other sites More sharing options...
akitchin Posted August 21, 2008 Share Posted August 21, 2008 that doesn't look like the line i posted. change it to the one i posted and try again. Quote Link to comment Share on other sites More sharing options...
BradleyBrokers Posted August 21, 2008 Author Share Posted August 21, 2008 OOooops I was wrong.... It was the short hand version problem. The long hand version works. Yes! Yes! Thanks You Thanks YOU Thank YOU!!!!! Quote Link to comment 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.