Page 1 of 1

Using result data from PHP search

Posted: Thu Jun 03, 2010 5:12 pm
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?

Re: Using result data from PHP search

Posted: Thu Jun 03, 2010 5:30 pm
by requinix

Code: Select all

<a href="/videos/<?php echo $bname; ?>">Link</a>

Re: Using result data from PHP search

Posted: Fri Jun 04, 2010 12:15 pm
by madtv12
Thankyou... it works great and I've now used the same procedure with other php codes in html. Appreciate your help.