Page 1 of 1

I need a simple results page

Posted: Thu Apr 24, 2008 6:43 am
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:

Re: I need a simple results page

Posted: Thu Apr 24, 2008 7:22 am
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>

Re: I need a simple results page

Posted: Thu Apr 24, 2008 7:33 am
by aceconcepts
Have you ever created a form before?

If you have one already, post it.

Re: I need a simple results page

Posted: Thu Apr 24, 2008 8:26 am
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

Re: I need a simple results page

Posted: Thu Apr 24, 2008 8:55 am
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!

Re: I need a simple results page

Posted: Thu Apr 24, 2008 11:45 am
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

Re: I need a simple results page

Posted: Thu Apr 24, 2008 1:27 pm
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.