| | |
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: 28
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: 28
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
Views: 605 | Replies: 6
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox chrelad class cms code cron curl database date directory display download dynamic echo email error file files folder form forms function functions google href htaccess html image include insert integration ip java javascript joomla jquery limit link list login loop mail menu methods mlm mod_rewrite multiple mysql oop parse paypal pdf php phpmyadmin problem query radio random recursion regex remote script search select seo server sessions sms soap source space speed sql structure syntax system table tutorial update updates upload url validation validator variable video web webdesign xml youtube





