Using result data from PHP search

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
madtv12
Forum Newbie
Posts: 2
Joined: Thu Jun 03, 2010 4:47 pm

Using result data from PHP search

Post by madtv12 »

I am new to PHP. I have created an mysql database and used a search to successfully fetch data. I want to use this data (an flv file name) to subsequently run this flv file in my video player. How can I reference my result outside of the php script? Within php my result is in $bname and echos correctly as DarradServices.flv (A stored entry from my database retrieve). I cannot work out how to use this outside of php. My outside code is
href="www.database.com/videos/$bname" but of course $bname is not recognized! Can anyone suggest something?
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Using result data from PHP search

Post by requinix »

Code: Select all

<a href="/videos/<?php echo $bname; ?>">Link</a>
madtv12
Forum Newbie
Posts: 2
Joined: Thu Jun 03, 2010 4:47 pm

Re: Using result data from PHP search

Post by madtv12 »

Thankyou... it works great and I've now used the same procedure with other php codes in html. Appreciate your help.
Post Reply