tfburges Posted July 15, 2008 Share Posted July 15, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/114859-solved-really-quick-question/ Share on other sites More sharing options...
JD* Posted July 15, 2008 Share Posted July 15, 2008 $_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. Quote Link to comment https://forums.phpfreaks.com/topic/114859-solved-really-quick-question/#findComment-590650 Share on other sites More sharing options...
MadTechie Posted July 15, 2008 Share Posted July 15, 2008 why would $_POST[$qf] work ? its a get not a post ! Quote Link to comment https://forums.phpfreaks.com/topic/114859-solved-really-quick-question/#findComment-590651 Share on other sites More sharing options...
New Coder Posted July 15, 2008 Share Posted July 15, 2008 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 post all your code Quote Link to comment https://forums.phpfreaks.com/topic/114859-solved-really-quick-question/#findComment-590652 Share on other sites More sharing options...
tfburges Posted July 15, 2008 Author Share Posted July 15, 2008 $_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 Quote Link to comment https://forums.phpfreaks.com/topic/114859-solved-really-quick-question/#findComment-590659 Share on other sites More sharing options...
JD* Posted July 15, 2008 Share Posted July 15, 2008 Don't forget to mark your post as solved if it's fixed. Quote Link to comment https://forums.phpfreaks.com/topic/114859-solved-really-quick-question/#findComment-590676 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.