Jump to content


Photo

question


  • Please log in to reply
7 replies to this topic

#1 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 06 July 2006 - 12:24 PM

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?

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#2 hussain

hussain
  • Members
  • PipPip
  • Member
  • 11 posts

Posted 06 July 2006 - 12:27 PM

put semi colon after $funnyurl

#3 //Bliss

//Bliss
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 06 July 2006 - 12:29 PM


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


That should work. =]

#4 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 06 July 2006 - 01:28 PM

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

#5 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 06 July 2006 - 01:57 PM

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.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#6 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 06 July 2006 - 02:09 PM

As I said "<?=" is a shortcut for "<?php echo".

Ken

#7 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 06 July 2006 - 02:14 PM

Ah so instead I would use
<?php echo $funnyurl?>

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#8 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 06 July 2006 - 02:25 PM

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users