Simple Post Problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Eroc
Forum Newbie
Posts: 3
Joined: Fri May 21, 2004 11:44 am

Simple Post Problem

Post by Eroc »

I have the following link that I am passing the username to default.aspx to....

Code: Select all

I am passing this name: <br><br><?php echo $userdata&#1111;'username']; ?><br><br>With this link:<br><br>
<form action="http://localhost/clanmanager/default.aspx" method="post"> 
<input type="hidden" name="userid" value="<?php echo $userdata&#1111;'username']; ?>"> 
<input type="image" src="clickme.jpg" border="0"> 
</form> I have the following code:
Which displays the 'echo $userdata' fine... the problem is when it submits to the default.aspx it's not passing the username. I am overlooking something, can someone help me?

Thanks,
Eroc
jason
Site Admin
Posts: 1767
Joined: Thu Apr 18, 2002 3:14 pm
Location: Montreal, CA
Contact:

Post by jason »

How do you know it's not passing the userid?
User avatar
launchcode
Forum Contributor
Posts: 401
Joined: Tue May 11, 2004 7:32 pm
Location: UK
Contact:

Post by launchcode »

View the HTML source of the page before submitting - is the hidden field with the userid in there?

If so the problem is in your ASPX file (and wouldn't that make a change ;) )
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

is the code above on a live server? ... cause it's going to localhost..
Eroc
Forum Newbie
Posts: 3
Joined: Fri May 21, 2004 11:44 am

Post by Eroc »

localhost cause I am dialed in via Terminal Services....

How do I know? It's a script file that's worked for quite some time where other programs pass it the username.

when I look at the html source it has this:

Code: Select all

I am passing this name: <br><br>Anonymous<br><br>With this link:<br><br>
<form action="http://localhost/clanmanager/default.aspx" method="post"> 
<input type="hidden" name="userid" value="Anonymous"> 
<input type="image" src="clickme.jpg" border="0"> 
</form>
That help any?

Thanks for the input !
Eroc
User avatar
launchcode
Forum Contributor
Posts: 401
Joined: Tue May 11, 2004 7:32 pm
Location: UK
Contact:

Post by launchcode »

Sure - providing that "Anonymous" is a valid userid it means there is nothing wrong with your PHP code at all. It is doing exactly what you told it to do.

This clanmanager ASPX script is either expecting a different value to be sent to it, or a different method (GET instead of POST maybe?) but the problem IS there.
Eroc
Forum Newbie
Posts: 3
Joined: Fri May 21, 2004 11:44 am

Post by Eroc »

Great I'll have them check their side of things. Appreciate the info !

Eroc
Post Reply