Jump to content

Archived

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

Ninjakreborn

question

Recommended Posts

I have my php script set up like this.
<embed src="<?=$funnyurl?>" width="100" height="100"></embed>

I am passing a php variable into, it connects but it's not playing, it shows a big question mark.  Is there something else I need to do to get files to display.  I need to pull the stuff from the database, and play it from the directory, I have a script set up, and it properly handles pictures, txt, and now it's time for music, and video?

Share this post


Link to post
Share on other sites

<embed src="<?php echo $funnyurl; ?>" width="100" height="100"></embed>


That should work. =]

Share this post


Link to post
Share on other sites
The "<?=" is a shortcut for "<?php echo".

You really should get used to not using short tags and this shortcut, since they will probably go away in PHP6.

Ken

Share this post


Link to post
Share on other sites
What can I use in stead of the shortcut, it's not too late for me to change it all now.  I just thought it was an easy way to insert stuff in xhtml without taking up too much room, what do you recommend.

Share this post


Link to post
Share on other sites
As I said "<?=" is a shortcut for "<?php echo".

Ken

Share this post


Link to post
Share on other sites
Yes that is correct also make sure you have a semi-colon before the closing ?> tag so its this:
<?php echo $funnyurl; ?>

Share this post


Link to post
Share on other sites

×

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.