This is a discussion on Simple question for PHP within the PHP Programming forums, part of the Web Development category; Hi all, I use a database to extract the title of a url. I want to take save this title ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| Hi all, I use a database to extract the title of a url. I want to take save this title in a variable and then check if it is url1 or url2. If it is url1 call url1 javascript function else if url2 call url2 function. My code is : Code: $query = "SELECT url FROM info"; $row = mysql_fetch_array($result); if ($row['url']=='http://....') { echo '<A HREF="'; echo '<SCRIPT LANGUAGE="javascript">'; echo 'popUp("url1.php")'; echo "</SCRIPT>"; echo '">'; } if($row['url']=='http://...') { echo '<A HREF="'; echo '<SCRIPT LANGUAGE="javascript">'; echo 'popUp("url2.php")'; echo "</SCRIPT>"; echo '">'; } What is the error?? Thanking you in advance Web application development |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Simple program help... | hkp819 | C and C++ Programming | 1 | 12-28-2008 07:38 AM |
| Simple URL Variable | jennifergttfrd | PHP Programming | 0 | 12-27-2008 07:45 AM |
| Simple Interview Questions | Sathish Kumar | C# Programming | 56 | 03-21-2008 06:53 AM |
| simple example for the java concepts | lavanya | Java Programming | 2 | 07-20-2007 05:48 AM |
| Create Simple ShoutBox | spid4r | PHP Programming | 0 | 03-08-2007 10:03 PM |
Our Partners |