Forum Moderators: coopster

Message Too Old, No Replies

PHP Varible Not Recognized

         

capulet_x

6:23 am on Apr 9, 2007 (gmt 0)

10+ Year Member



I am trying to include a varible as part of a value in my form. I was wondering if someone wouldn't mind taking a look at my script and tell me if there is any reason why this shouldn't work. Below is an excerpt. Everthing else works correctly but I must have an error here because I see everything in my formfield except the value of the variable.

$submitted = $_COOKIE['sub_file'];

<div id="box">
<fieldset id="form"><legend><a href="$this">Send a File</a></legend>
<form method="post" name="form10">
<p title="URL of a file. "><span class="label">URL of file to send</span><input class="wide" type="text" name="remote" value="http://www.example.com/upload/" . $submitted ></p>
<input type="hidden" name="action" value="mirror">
</form>
</fieldset>
</div>

Any help will be appreciated.

cameraman

7:01 am on Apr 9, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm not seeing an echo anywhere near.
value="http://www.example.com/upload/<?php echo $submitted;?>" >

capulet_x

7:07 am on Apr 9, 2007 (gmt 0)

10+ Year Member



Yea, sorry, I didn't put that in my example but I did try it but I get this in my field:

http://www.example.com/dbx1/1on1design_interface/ClientAccess/ClientFiles/upload/<?php echo ;?>

weird, huh?

[edited by: dreamcatcher at 7:24 am (utc) on April 9, 2007]
[edit reason] Exemplified url. [/edit]

cameraman

8:01 am on Apr 9, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



echo the cookie value to make sure it's ok. It's going to end up being something dingy like that.

capulet_x

8:06 am on Apr 9, 2007 (gmt 0)

10+ Year Member



everything echos just fine. Very strange.

cameraman

8:12 am on Apr 9, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That's pretty bizarre. And (sorry but I just have to ask this) the file does have a php extension, right?

The only other thing I can think to try is erase or comment out those couple of lines and retype them (not paste) - I've had that happen before, some unprintable character sneaks in (or some other inexplicable thing) and causes trouble and retyping the same dadgum thing works just fine.