| | |
pointing an iframe to a .php file
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: May 2008
Posts: 27
Reputation:
Solved Threads: 0
Is there something special i need to do to get this to work? I made a script that builds a neat little table with pictures from the sql database, and want it to go into an iframe. When i run the code I get this:
(screenshot)
http://www.freewebs.com/xylude/helpme.jpg
It just shows the actual script in text form inside of the iframe.
Here is the tag I used to link to the php doc.
(screenshot)
http://www.freewebs.com/xylude/helpme.jpg
It just shows the actual script in text form inside of the iframe.
Here is the tag I used to link to the php doc.
PHP Syntax (Toggle Plain Text)
<iframe src="../thumbloader.php" name="thumbnails" align="middle" scrolling="auto">
•
•
Join Date: May 2008
Posts: 27
Reputation:
Solved Threads: 0
This script works fine on its own just not in the iframe...
PHP Syntax (Toggle Plain Text)
<? $dbhost = 'localhost'; $dbusername = 'xylude'; $dbpassword = ''; $database_name = 'allprodata'; $connection = mysql_pconnect("$dbhost", "$dbusername", "$dbpassword") or die ("Could not connect to database"); $db = mysql_select_db("$database_name", $connection) or die ("Could not find database"); $returnstrings = mysql_query("SELECT * FROM videos WHERE category = 'dice'") or die(mysql_error()); $rowcount = 0; echo " <table width='200' border='1'>"; while ($result = mysql_fetch_assoc($returnstrings)) { $rowcount = $rowcount + 1; $thumbnail = $result ['vidthumbsrc']; $hlink = $result ['previewurl']; echo "<td align = 'center'><img src = '$thumbnail'><br>"; echo "<a href = '$hlink'>"; echo $result ['name']; echo "</a></td>"; if ($rowcount == 4) { echo "</tr>"; echo "<tr>"; $rowcount = 0; } } echo mysql_num_rows($returnstrings); ?>
Last edited by xylude; Jul 23rd, 2008 at 11:14 pm.
That's strange because its just an http request as far as the server goes. It should just serve the html like normal. This doesn't make any sense to me, maybe someone else can give you more input.
“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” - Dr. Seuss
-- The documentation is inevitable, you may get away with it for a little while but eventually you too will have to do the deed.
-- The documentation is inevitable, you may get away with it for a little while but eventually you too will have to do the deed.
![]() |
Similar Threads
- free php/mysql programming (Web Development Job Offers)
Other Threads in the PHP Forum
- Previous Thread: PHP Pear
- Next Thread: Secure PHP Login Script
| Thread Tools | Search this Thread |
301 apache api array beginner beneath binary broadband broken button cakephp checkbox class cms code compression countingeverycharactersfromastring crack cron curl database date decode display dynamic echo email error file files folder form forms function functions google href htaccess html httppost image include insert integration ip javascript joomla limit link links login mail match md5 menu mlm multiple mysql mysql_real_escape_string oop paypal pdf php problem protocol query radio random recursion remote script search server session sessions sms smtp soap source space sql strip_tags survey syntax system table tutorial undefined update upload url validator variable video virus votedown web window.onbeforeunload=closeme; xml youtube





