Jump to content

Recommended Posts

What's wrong with this?

 

A field has a hyperlink beside it with the URL linked to the field description so that the field description and any matching data within the database pertaining to that field can be queried.

 

Example URL (all variables exist):

saac.php?fnvs=",$selected_formx_v,"&qf=",$dfcdi,"

 

Then in saac.php...

$qf = $_GET['qf'];
$qpf = $_POST[$qf];
echo $qpf;

 

$qf works fine but $qpf doesn't.  It must be a syntax error or something special that I'm not aware of.

 

I've also tried $qpf = $_POST['$qf']; and other ways to put single quotes around $qf.

Link to comment
https://forums.phpfreaks.com/topic/114859-solved-really-quick-question/
Share on other sites

With

 

$qf = $_GET['qf'];

$qpf = $_POST[$qf];

echo $qpf;

 

it looks like you are trying to put the variable $gf that you have recieved via the url into a new variable $gpf... if so

 

$qpf = $qf;

 

will work. if your trying to then send the variable $gpf somewhere else via post I would put it into a hidden input type.

 

I may have totally misunderstood what you are doing ;D

post all your code

$_POST only works when you post the infomation, i.e. you submit the form. So unless I misread, you're clicking on a hyperlink to get a description, but not submitting the form and that's where the problem is.

 

OHHHHHHHHHH LOLOLOLOLOL WOW I CAN'T BELIEVE I OVERLOOKED THAT!

 

THANKS!!1!11ONE

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.