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.

PHP Forum


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



Freelance Jobs

Reply
PHP Post not working but Get working
Old 07-09-2010, 01:18 PM PHP Post not working but Get working
Registered User

Posts: 3
Trades: 0
So, I've been trying to write a memory test program, with images (thus, C is out of the question, for cross-platform issues). I've come across an interesting problem. To prevent users from crashing the system, I resorted to $_POST. However, upon testing, I noticed that print_r($_POST) shows nothing, while the same code (except for method="post" => method="get") runs perfectly, and data is transmitted properly when the form uses get. Any idea on what's going on? The outputs for print_r($_POST) and print_r($_GET) are as follows:
Using POST:
Array ( [id] => 1 )
Array ( )
Using GET:
Array ( [id] => 1 [qn] => 20 [ans] => Array ( [2] => W [4] => images/ser.GIF ) )
Array ( )

GET shows what I want if I were using post, but it's not happening. Any ideas, guys?

Thanks in advance,

~wqian94~
wqian94 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-09-2010, 01:39 PM Re: PHP Post not working but Get working
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
We may just need a bit more that that to go on.

Do we get to see the actual code? working and not working.
__________________
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 offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 07-09-2010, 01:50 PM Re: PHP Post not working but Get working
Registered User

Posts: 3
Trades: 0
The only difference in code between working and not working is in the <form> tag, for attribute method="post" versus method="get".

The HTML code is really long, with the contents of the form covering ~2/3 of the HTML

Last edited by wqian94; 07-09-2010 at 01:51 PM..
wqian94 is offline
Reply With Quote
View Public Profile
 
Old 07-09-2010, 04:53 PM Re: PHP Post not working but Get working
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
So what exactly do you want us to do? Because with no code to look at or test, we are at somewhat of a loss to actually do anything.
__________________
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 offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 07-09-2010, 05:03 PM Re: PHP Post not working but Get working
Registered User

Posts: 3
Trades: 0
never mind about this, I caught the problem, and am fixing it.

thanks anyways!
wqian94 is offline
Reply With Quote
View Public Profile
 
Old 07-09-2010, 05:12 PM Re: PHP Post not working but Get working
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Be sure to let us know whatever it was/is.
__________________
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 offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to PHP Post not working but Get working
 

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.22717 seconds with 12 queries