Jump to content

[SOLVED] combining php variable with html url


chrisuk

Recommended Posts

I am trying to create a URL from a record in a database IF there is an entry in the filename field(otherwise i wish for it to say "no file submitted")

 

I have tried both:

 

$url = '<a href="http://<site>/uploads/"'echo $filename'>Link</a>';

 

and

 

$url = '<a href="http://<site>/uploads/'echo $filename;'">Link</a>';

but both give:

 

Parse error: parse error, unexpected T_ECHO in <site/page.php> on line 33

 

What am I doing wrong?

 

Thanks

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.