Jump to content

Variable not passing through


Go to solution Solved by alanl1,

Recommended Posts

I have a form

 

<form method='POST' name="myform" action="test.php?filename=$filename"  >

 

 

when I try to retrieve the variable I get nothing.

 

My browser just shows this

 

http://localhost/test.php?filename=$filename

 

$newfilename = $_POST[$filename];

echo " the filename is ".$newfilename;

 

 

 

the filename is

 

Link to comment
https://forums.phpfreaks.com/topic/279020-variable-not-passing-through/
Share on other sites

wow that was fast.

 

i have tried that which sort of works, it shows in the browser ok now

 

I still cannot seem to echo this out on the next page though, am i doing something else wrong

 

 

$newfilename = $_POST[$filename];

echo " the filename is ".$newfilename;

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.