Jump to content

Archived

This topic is now archived and is closed to further replies.

Yojance

Displaying IMGs (It's not working.)

Recommended Posts

I'm just wrote a very simple script that creates a link to an image. When I put all the code into <img src="all php code here /> the image won't display.
I think I heard something about letting the browser know that an image is coming, I looked for it but I did not find it.
Could anyone help me.
Thanks.

Share this post


Link to post
Share on other sites
you mention browser

if you can see images in genrall on webites then your browser has images on

so that woudnt be the problam

as advised post your code.

Share this post


Link to post
Share on other sites
Here is my lame code.
[code]<?php
if(isset($_POST['img'])) {
$IMG = $_POST['img'];
$img = ($_POST['IMG'] / 100);
$imgdir = 'images/'
$chopurl = 'http://mysite.com/';
echo '<img src="'.$imgdir.$IMG.'.jpg" />';
}

?>[/code]

Thanks for the fast response.

Share this post


Link to post
Share on other sites
are you sure that the form set to name="img" useually submit name="submit"



<?php
if(isset($_POST['submit])) {

$IMG = ($_POST(['img']));


$img="whatever.jpg";

$imgdir = "images/";

$url = "http://mysite.com/";

echo "<img src='$url$imgdir$img' />";

}

?>

Share this post


Link to post
Share on other sites
Tried it and it works, plus I have a friend who just signed on MSN who is going to help me. Thank you so much.

Share this post


Link to post
Share on other sites

×

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.