Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 07-21-2004, 04:40 PM   #1 (permalink)
 
Super Techie

Join Date: Oct 2003

Posts: 439

Obtruse_Man4

Default PHP noob help

ok i've been following this tutorial off and on, trying to learn php as I go. I know simple stuff, but want to learn more. So I tried making an image gallery, but of course it doesn't work:rolleyes:

Here's the files that i've created:

photo_display.php

index.php

and here's the tutorial i've been following:

webmonkey

I basically copied and did everything he said to do, but I get that error as you see in index.php Can someone help me please, i've been all through the code and I guess I just don't know enough yet to spot any dumb mistakes.
Obtruse_Man4 is offline  
Old 07-22-2004, 09:06 AM   #2 (permalink)
ADZ
 
Master Techie

Join Date: May 2003

Posts: 2,233

ADZ is on a distinguished road

Send a message via Yahoo to ADZ
Default

first of all I dont know a LOT of PHP, but i do know HTML, and there is a space between the < and the a href - I would change that and see what the outcome is, I think i will print that article off and do it tonight.

Let me know how that works.
ADZ is offline  
Old 07-22-2004, 11:58 AM   #3 (permalink)
 
Super Techie

Join Date: Apr 2004

Posts: 316

BlazingWolf

Default

Can you post the whole like with the HTML that is appearing.
__________________
BlazingWolf
<font color=\'red\'>
<b>
<a href=\'http://www.gaming-forums.org\'>
Gaming-Forums.org
<a/>
</b>
</font>
BlazingWolf is offline  
Old 07-22-2004, 02:40 PM   #4 (permalink)
 
Super Techie

Join Date: Oct 2003

Posts: 439

Obtruse_Man4

Default

Here's the index.php code:

index code

and the photo_display.php code:

photo display

EDIT: hmm I got it working but the window won't pop up, strange
Obtruse_Man4 is offline  
Old 07-22-2004, 05:24 PM   #5 (permalink)
 
Super Techie

Join Date: Apr 2004

Posts: 316

BlazingWolf

Default

The pop-up issue is something with your Javascript code, but the photo_display page I can help you with.

On the photo_display.php $photo is blank. Thats why it gives you that error. I see your passing it in the URL but before you can use it you need to put

$_GET['photo'];

Once PHP reads that line you can use the varible, however to use it you need to put $_GET['photo'] or you can just set that to be the value of the photo varible like this...

$photo = $_GET['photo'];

That should fix your problem.
__________________
BlazingWolf
<font color=\'red\'>
<b>
<a href=\'http://www.gaming-forums.org\'>
Gaming-Forums.org
<a/>
</b>
</font>
BlazingWolf is offline  
Old 07-22-2004, 10:53 PM   #6 (permalink)
 
Super Techie

Join Date: Oct 2003

Posts: 439

Obtruse_Man4

Default

oh I get it, I was wondering how it got the value for photo? So what that does is transfer the value for photo from index.php to photo_display.php?
Obtruse_Man4 is offline  
Old 07-22-2004, 11:01 PM   #7 (permalink)
 
Super Techie

Join Date: Apr 2004

Posts: 316

BlazingWolf

Default

Right it passes the varible through the url if you notice the

'?photo=myimage.jpg'

That is PHP passing the varible from page to page.
__________________
BlazingWolf
<font color=\'red\'>
<b>
<a href=\'http://www.gaming-forums.org\'>
Gaming-Forums.org
<a/>
</b>
</font>
BlazingWolf is offline  
Old 07-22-2004, 11:06 PM   #8 (permalink)
 
Super Techie

Join Date: Oct 2003

Posts: 439

Obtruse_Man4

Default

woops for some reason it doesn't work

here's what I have:

PHP Code:
<?PHP
    $photo 
$_GET['photo'];
    
$photo_size getimagesize("$photo");
?>
maybe this is too advanced for me right now, looked good at first but seems like it's too complex
Obtruse_Man4 is offline  
Old 07-23-2004, 10:40 PM   #9 (permalink)
 
Super Techie

Join Date: Apr 2004

Posts: 316

BlazingWolf

Default

Post a link to the update code, I'll look when I get back next week.
__________________
BlazingWolf
<font color=\'red\'>
<b>
<a href=\'http://www.gaming-forums.org\'>
Gaming-Forums.org
<a/>
</b>
</font>
BlazingWolf is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On