Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Old 01-10-2006, 03:29 PM Upload image form
Extreme Talker

Posts: 219
Location: UK, East Anglia
Trades: 0
I have created a php script that uploads an image, it is located at forum.php?act=add_avatar
But the form goes to the same page that it's on, forum.php?act=avatar

HTML Code:
<form action=\"forum.php?act=add_avatar\" method=\"post\" enctype=\"multipart/form-data\">
Upload Avatar: <input type=\"file\" name=\"imagefile\"><input type=\"submit\" name=\"submit\" value=\"Add Avatar\">
</form>
Whats wrong with the form?
timsquash5 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-10-2006, 05:01 PM
TrentonD's Avatar
Ultra Talker

Posts: 253
Location: Calgary, Alberta, Canada
Trades: 0
There seems to be nothing wrong with the forum.

What I think you want to know is, is that whatever you have set to "action=' ' ", is the page your form is "sent" to.

The reason you keep on getting sent to forum.php?act=add_avatar is because you have that in your action.

I take it you also have a PHP code that goes along with this...?
__________________
Signature Coming Soon! :)
Please login or register to view this content. Registration is FREE
TrentonD is offline
Reply With Quote
View Public Profile Visit TrentonD's homepage!
 
Old 01-11-2006, 11:25 AM
Extreme Talker

Posts: 219
Location: UK, East Anglia
Trades: 0
No, i'm not getting sent to forum.php?act=add_avatar, i'm staying on the same page that the form is on, forum.php?act=avatar.
timsquash5 is offline
Reply With Quote
View Public Profile
 
Old 01-16-2006, 05:18 PM
ChipJohns's Avatar
I don't know! Do you?

Posts: 488
Name: Chip Johns
Location: Savannah Georgia
Trades: 0
I have never seen the backslashes used in the code for a form like this. Is this xhtml compliant? or does it have something to do with the php coding?
ChipJohns is offline
Reply With Quote
View Public Profile Visit ChipJohns's homepage!
 
Old 01-16-2006, 05:28 PM
Average Talker

Posts: 26
Location: the Netherlands
Trades: 0
Quote:
Originally Posted by ChipJohns
I have never seen the backslashes used in the code for a form like this. Is this xhtml compliant? or does it have something to do with the php coding?
I think he prints this code with double quotes, like this:

PHP Code:
<?
echo "<form action=\"forum.php?act=add_avatar\" method=\"post\" enctype=\"multipart/form-data\">
Upload Avatar: <input type=\"file\" name=\"imagefile\"><input type=\"submit\" name=\"submit\" value=\"Add Avatar\">
</form>"
;
?>
I've just tested this HTML code:
HTML Code:
<form action="forum.php?act=add_avatar" method="post" enctype="multipart/form-data"> Upload Avatar: <input type="file" name="imagefile"><input type="submit" name="submit" value="Add Avatar"> </form>
And it works fine..
PeterB is offline
Reply With Quote
View Public Profile Visit PeterB's homepage!
 
Old 01-16-2006, 07:21 PM
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,383
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
the "\" is a php escape character. It tells the server that the character following is a literal, and not part of the code flow.
So the \" prints the double quote to the page rather than it getting treated as the string delimiter.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Upload image form
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.45288 seconds with 12 queries