I need a simple results page

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
tooold
Forum Newbie
Posts: 3
Joined: Sun Apr 20, 2008 10:01 am

I need a simple results page

Post by tooold »

I have written (I think) a web page that posts to a remote URL. The results should be posted back to a URL on my site. Problem is I dont know how it should be written.
These are the parameters I have been told to post to.
Method URL: https://www.theirsite/ngn/ngn_reseller.asp


Post Parameters:
Userid – user id
Password - password
ngn_number – access number
redirect_to – number to redirect to
ngn_status (active/cease)
dest_url - the full name of the page to redirect to with the results

The bit I cant write is the results page:-

Parameters posted to the Dest_Url:
request_status – accept or failed
reason – will provide the reason if failed

If anyone can help you would make me happy :cry:
dhiraj
Forum Newbie
Posts: 12
Joined: Wed Apr 23, 2008 12:23 am

Re: I need a simple results page

Post by dhiraj »

dear,

i think problem on your form actioni mean form action is not sullied correctlyy checkit out again i hope yr problem solved after checking the form action.

ex <form name = 'myform' method='post' action='your action'>
rest coe here
</form>
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Re: I need a simple results page

Post by aceconcepts »

Have you ever created a form before?

If you have one already, post it.
tooold
Forum Newbie
Posts: 3
Joined: Sun Apr 20, 2008 10:01 am

Re: I need a simple results page

Post by tooold »

I havnt written a form in PHP but have used wysiwyg to create one in HTML.
The only information I have been given is that shown in my original post.

Is there any more info needed in order for the post to work?
A simple example may help me.

Thanks
John
User avatar
andym01480
Forum Contributor
Posts: 390
Joined: Wed Apr 19, 2006 5:01 pm

Re: I need a simple results page

Post by andym01480 »

Show us what you have from WYSIWYG editor for the form - then we can tell whether you are posting the data correctly to the other site.
Once that is okay, you will need to process what they send back.

1) First things first, post the html code for the form in a reply
2) Does your webhost allow you PHP scripts, so we can help you process what comes back? Need to know that before we start helping you with PHP code for processing it!
tooold
Forum Newbie
Posts: 3
Joined: Sun Apr 20, 2008 10:01 am

Re: I need a simple results page

Post by tooold »

I can't give out the username and password which everyone will see if i post it here.
My ISP does support PHP.

:|

John
User avatar
andym01480
Forum Contributor
Posts: 390
Joined: Wed Apr 19, 2006 5:01 pm

Re: I need a simple results page

Post by andym01480 »

Huh?
A form would only have the username and password in it if you filled it in! Right click and view source, before filling it in and then copy and paste!
Or if you have pre-filled the form with hidden fields - then just replace the sensitive data with ### or something.

When the offsite returns to you, the data they "posted" back to you can be accessed using the $_POST array.

Code: Select all

 
<?php
echo $_POST['request_status'];//shows you whether it was – accepted or failed
echo'<br/'; 
echo $_POST['reason']; // will provide the reason if failed
?>
 
Save that to the dest_url.php file and it should work.
Post Reply