Jump to content

php form, data behind form


Porkie

Recommended Posts

the problem is a want to load multiple images from the database to show in the background behind my form

 

<style type="text/css">

<!--

body {

background-image: url(imagelocation);

}

-->

</style>

 

could i load multiple images using this function or would i need a different one?

 

cheers

Link to comment
Share on other sites

i looked through and created a file like said on the link, where is the problem here?

 

<?php header("Content-type: text/css; charset: UTF-8");
error_reporting(E_ALL);
include('conn.php');
$sql = "SELECT * FROM fsdf_image";
$sql2 = mysql_query($sql);

echo '<table><tr>';
while ($row = mysql_fetch_array($sql2)) {
     echo '<td>';
     echo '<img src="/uploads/'.$row['image'].'/default.jpg"width=60" height="50" />';
}



?>  

error code

<table><tr><br />

<b>Warning</b>:  mysql_fetch_array(): supplied argument is not a valid MySQL result resource in <b>/home/public_html/css/supercharged.php</b> on line <b>8</b><br />/quote]

 

any help will be greatly appreciated

 

Link to comment
Share on other sites

  • 2 weeks later...

i looked through and created a file like said on the link, where is the problem here?

 

<?php header("Content-type: text/css; charset: UTF-8");
error_reporting(E_ALL);
include('conn.php');
$sql = "SELECT * FROM fsdf_image";
$sql2 = mysql_query($sql);

echo '<table><tr>';
while ($row = mysql_fetch_array($sql2)) {
     echo '<td>';
     echo '<img src="/uploads/'.$row['image'].'/default.jpg"width=60" height="50" />';
}



?>  

error code

<table><tr><br />

<b>Warning</b>:  mysql_fetch_array(): supplied argument is not a valid MySQL result resource in <b>/home/public_html/css/supercharged.php</b> on line <b>8</b><br />/quote]

 

any help will be greatly appreciated

 

i don't see any error in the code have you checked if you have any data in the table? does the table exists?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.