HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Won't work
Post new topic   Reply to topic    HTML Help Forum Index -> PHP
View previous topic :: View next topic  
Author Message
Daler



Joined: 23 May 2008
Posts: 53

PostPosted: Tue Aug 19, 2008 9:21 am     Won't work Reply with quote

I'm trying to write a code for an image upload script, but i keep getting this message:
Code:

Parse error: syntax error, unexpected '>' in /www/vndv.com/e/a/s/easyimagehosts/htdocs/upload.php on line 66


I'm trying to make the code which will make the image code pop up. This is what I have used:

Code:

if(isset($_POST['Submit']) && !$errors)
{
echo "<center>";
echo "<h1>File Uploaded Successfully</h1>;
echo "<h3>Your Image Link Is:</h3>"http://wwwm.easyimagehosts.vndv.com/"$image_name";
echo "</center>";


Can someone fix it for me?[/code]
PayneLess Designs



Joined: 28 Feb 2007
Posts: 1417
Location: Biloxi, MS

PostPosted: Tue Aug 19, 2008 1:37 pm     Reply with quote

Try escaping your closing tags. Just a guess.
Daler



Joined: 23 May 2008
Posts: 53

PostPosted: Tue Aug 19, 2008 2:00 pm     Reply with quote

Escaping my closing tags?

I'm fairly new to all of this, how would I do that?
PayneLess Designs



Joined: 28 Feb 2007
Posts: 1417
Location: Biloxi, MS

PostPosted: Tue Aug 19, 2008 4:42 pm     Reply with quote

Well, I'm just guessing at this, too, as I can't test it here:

Code:
if(isset($_POST['Submit']) && !$errors)
{
echo "<center>";
echo "<h1>File Uploaded Successfully<\/h1>;
echo "<h3>Your Image Link Is:<\/h3>"http://wwwm.easyimagehosts.vndv.com/"$image_name";
echo "<\/center>";


The '\' would be escaping all closing tags. Not even sure if that is the solution. Laughing
Daler



Joined: 23 May 2008
Posts: 53

PostPosted: Wed Aug 20, 2008 12:02 am     Reply with quote

Okay, thanks. I'll see if that works.

Edit Sorted it now Very Happy That wasn't quite the answer, but it brought me to the correct one Very Happy


Now I just have to make it show BBCode and the HTML lol.
PayneLess Designs



Joined: 28 Feb 2007
Posts: 1417
Location: Biloxi, MS

PostPosted: Wed Aug 20, 2008 3:58 am     Reply with quote

Glad you got closer to the solution. Please post it when you get to it as I would be interested to know, too. Embarassed
Daler



Joined: 23 May 2008
Posts: 53

PostPosted: Wed Aug 20, 2008 5:19 am     Reply with quote

I'll put the script up for download now.

I coded it so that you can change the look of the frontpage with a WYSIWYG editor, by putting the form in a seperate file.



Download it there. I did have a demo set up, but the server's down at the minute.
PayneLess Designs



Joined: 28 Feb 2007
Posts: 1417
Location: Biloxi, MS

PostPosted: Wed Aug 20, 2008 6:13 am     Reply with quote

Thank you. Will take a look at it when I can. Right in the middle of waiting on FEMA again.
Daler



Joined: 23 May 2008
Posts: 53

PostPosted: Wed Aug 20, 2008 6:46 am     Reply with quote

Here's the demo
PayneLess Designs



Joined: 28 Feb 2007
Posts: 1417
Location: Biloxi, MS

PostPosted: Wed Aug 20, 2008 7:04 am     Reply with quote

Says server not found with that link.
Daler



Joined: 23 May 2008
Posts: 53

PostPosted: Wed Aug 20, 2008 7:39 am     Reply with quote

Server's down again :@

And that server is one of the few which allow image hosting sites
Daler



Joined: 23 May 2008
Posts: 53

PostPosted: Wed Aug 20, 2008 8:49 am     Reply with quote

Okay, looks like it's up again for good.

So the demo can be found here
PayneLess Designs



Joined: 28 Feb 2007
Posts: 1417
Location: Biloxi, MS

PostPosted: Wed Aug 20, 2008 11:18 am     Reply with quote

I guess it still needs work as even, if I don't browse for an image and just click the Upload Image button, I get this:

Quote:
File Uploaded Successfully
Your Image Link Is:
http://www.easyimagehosts.vndv.com/images/
Surprised

But it does work! Just gives the image link for now and image is online:
Laughing

Good job!!!

Why does image only display for a second or two and disappears? Hotlinking turned on? My uploaded image link: http://www.easyimagehosts.vndv.com/images/1219245475.gif

Update: Just clicked the image link and got a 403 error -
Quote:
403 Forbidden!

The address you have entered is not open to the public.
Daler



Joined: 23 May 2008
Posts: 53

PostPosted: Wed Aug 20, 2008 11:43 am     Reply with quote

I'll try CHMODDing it. I wonder why that happened? :S

It's something to do with my host :S

I used to have a reseller account, but I couldn't afford it Sad The space wasn't selling Sad
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> PHP All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial