Jump to content

Basic question variables in URL


a_glennsmith

Recommended Posts

I have inherited some pages from someone else who wrote them and as I am a newbie and the code is quite old I suspect it needs to be updated in order to work.

 

I have two variables $p and $service that were passed from page 1 to page 2 via the URL.  On page 2 I have updated the code for echo $_GET['$p'] etc and I am happy with that.

 

Lower down on page 2 within an HTML form the author has

 

<input type="hidden" name="service" value="<?
echo $service;
?>" />

<input type="hidden" name="p" value="<?
echo $p;
?>" />

 

with the intention of putting these variables in the URL for page 3 I have to assume.

 

Page 3 begins with this code

 

 "completeyourorder.php?p=" . $p . "&service=" . $service;

 

but the variable values are not showing up in the URL and I can not seem to use them on page 3.  In other words they don't seem to be available to me.

 

I'd appreciate help to change the page 3 code above or the page 2 code so that it works as intended.  I found some posts and researched tutorials but all that I have tried has not worked.

 

Thanks

Glenn

Link to comment
Share on other sites

 

im a noob too but this might help ya out

 

<?php "<a href=\"profile.php?id=$goauld_name\">$grab_goauld</a><br />\n"; ?>

 

 

i know for sure this 2nd format works if its related to your question

im echoing into the link

 

<?php <a href="search_goaulds.php?goauld=<?php echo $grab_goauld; ?>">Goa'ulds</a> ?>

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.