Jump to content
Killersites Forums

Page not loading correctly the first time


dailygraphics
 Share

Recommended Posts

Good afternoon all,

 

I have a php question about a webpage on my site. I hope I can articulate the question correctly to not cause any confusion. The problem can be found at ***. Once a customer clicks on an image for the first time a page is brought up that has the line,

 

product_info.php?Product_ID=17

 

The next page, product_info.php is not displayed. When a customer goes back to the product_list.php page and clicks on an image the product_info.php page comes up correctly. This only happens when a new internet session is started. I was just wanting to know if anyone had an idea as to why this is happening. If I need to supply more info please let me know.

 

Thanks in advance for any help on this matter.

Edited by dailygraphics
Link to comment
Share on other sites

Please be patient with me, I'm learning as I go. I'm not sure if this is the correct code snippet you are looking for but here you go. I did validate the page and received the error, I/O Error: Unknown mime type : image/jpeg. I don't understand that though and if it's relevant or not.

 

 

<? echo $short_desc; ?>




 

<?

 

 

I hope I've been helpful, if not, let me know.

Edited by dailygraphics
Link to comment
Share on other sites

I/O Error: Unknown mime type : image/jpeg

 

The error is always relevant!

 

:)

 

 echo $icon_img_link; ?>

 

You can't echo an image. You can echo out an image string ... but not the actual image. Based on the error, I am guessing that somehow the error has to do with you passing/use an image in a bad way with PHP.

 

:/

 

-

 

It is hard to discern with the code fragments. If you could, in bullet points, tell us what the code is trying to do. Don't write an essay, because people will not read it. Make sure it is in clear easy to read steps.

 

Stefan

Link to comment
Share on other sites

  • 2 weeks later...

As far as not being able to echo an image, I'm not sure what you mean. Forgive me if at any time I sound ignorant. For the code snippet, <? echo $icon_img_link; ?>, icon_img_link is the name of the field on my database where the images are stored. There used to be a form with a view items button that the customer clicked to view the items. I wanted the customer to be able to just click the image so I took the button away. Once I added the hyperlink to the image I started having the issue as described above. I guess my ultimate question would be, can I add a hyperlink to a dynamic image? If so, I am willing to do the work if someone would point me in the right direction. Thanks again.

Link to comment
Share on other sites

Hi all,

 

I've been looking at this all day again and trying to figure it out. I notice that the initial page that is brought up incorrectly has product_info.php(JPEG Image) as the title. The title should be Product Information. It's displayed correctly of course once going back and clicking the link again. I'm sure this is a simple fix but everything I've read is Greek to me. If anyone has any clue that would be great.

Link to comment
Share on other sites

Short_desc is set on the database. On my page I'm viewing in GoLive there is, not sure what it's called, but there's a blue rectangle that has, ?echo?, with the processing instructions,

echo $short_desc;. So the various product description are drawn from this one page using our database. As far as the URL, it's displayed the same way both times.

Link to comment
Share on other sites

PUT THIS PART AT THE TOP OF THE PAGE, THIS GETS THE PRODUCT ID FROM PREVIOUS FORM AND SPECIFIES WHERE TO FIND THE RELATIVE INFO IN YOUR DATA BASE.

 

<?

 

$Product_ID = $_POST['Product_ID'];

 

$getproduct = mysql_query("SELECT * FROM yourtable WHERE yourtableid = '$Product_ID'");

 

?>

 

PUT THIS WHERE YOU WANT TO DISPLAY THE RESULTS

 

<?

 

while ($product = mysql_fetch_array( $getproduct)) {

 

product details------------------> THIS IS YOUR RESULTS, IN THE LAYOUT YOUR REQUIRE EG..

 

?>

<? echo $product['titlefeildindatabase']; ?>

<? echo $product['imageurlfieildindatabase']; ?>

?<? echo $product['pricefeildindatabase']; ?>

Paypal add to cart button

<?

}

?>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

Loading...
 Share

×
×
  • Create New...