473,480 Members | 2,271 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to print out $_REQUEST varilables from a server

1 New Member
I am having problem retrieving $_REQUEST array key/value i submintted using post method. here is the simple form I am posting:
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. </head>
  4. <body>
  5.  
  6. <form action="http://192.168.130.51:8080/merchantAPI/postPairs" method="post">
  7.      Request Type:  <input type="text" name="reqType" value="CCSale"/><br />
  8.      Merchant ID:   <input type="text" name="merchantID" value="12"/><br />
  9.      Merchant Key:  <input type="text" name="merchantKey" value="key"/><br />
  10.      Refrence Num:  <input type="text" name="referenceNum" value="1"/><br />
  11.      Total Amount:  <input type="text" name="chargeTotal" value="1"/><br />
  12.      Credit Card#:  <input type="text" name="creditCardNumber" value="373235387881007"/><br />
  13.      Exp Month:     <input type="text" name="creditCardExpMonth" value="12"/><br />
  14.      Exp Year:      <input type="text" name="creditCardExpYear" value="2008"/><br />
  15.      <input type="submit" name="submit" value="Submit" >
  16. </form>
  17. </body> 
  18. </html>
  19.  
After submitting the form I want to view/print the response from the server using a simple code such as:
Expand|Select|Wrap|Line Numbers
  1. foreach($_REQUEST as $key=>$value)
  2. echo("<tr><td>$key</td><td>$value</td></tr>");
  3.  
how can i do this. can anyone please help
Jun 23 '08 #1
3 17490
Atli
5,058 Recognized Expert Expert
Hi. Welcome to Bytes!

The code you posted should work fine.
You just have to create a PHP file, containing the PHP code you posted, and have the action parameter of the <form> element point to that PHP file.
Jun 23 '08 #2
nashruddin
25 New Member
You mean you want to debug the variables from your PHP script?

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. print '<pre>';
  3. print_r($_REQUEST);
  4. print '</pre>';
  5. ?>
  6.  
Jun 24 '08 #3
Atli
5,058 Recognized Expert Expert
I like the compact version :)
Expand|Select|Wrap|Line Numbers
  1. echo "<pre>", print_r($_REQUEST, true), "</pre>";
  2.  
Jun 25 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
892
by: Leon | last post by:
as title.....how to do it ?..... >_< use remote call....? can don't use remote (possible)??on the same host use a single process ?? modify ip header ???
0
2159
by: Niels | last post by:
Hello, i recently installed a program that uses reports on our citrix(win2000) server. The problem with the program is, is that the tmp files dont have unique names. That can cause errors when...
3
1484
by: Kyle | last post by:
I want users to be able to select a picture on an ASP.NET webform and have the picture print from one of the server's printers that is installed in windows. I used code that worked in a windows...
1
311
by: Devin | last post by:
I am creating a form, and when a user clicks on the ASP.NET calendar control, or on another checkbox that sends a request to the server, the page reloads fine, except that it is at the top of the...
0
898
by: Julián Sanz García | last post by:
Hi!! How can i print send document to server printer in background process? thanks
0
1626
by: brianpmccullough | last post by:
Hello, Anyone ever implemented a solution that allows you to track the total page request time in and ASP.NET page? The time would need to include the server processing time and client side...
1
1352
by: cristina | last post by:
nobody can help me giving me some advice??? can i send a request to the server of google maps about the informations of restaurants pubs etc and try to visualize after in a file xml? is it...
2
11421
by: giloosh | last post by:
whats the best way to pass a json string to the server. if my jsonstring = {a:'1',b:'sds',c:'sdg'} could i send that to the server passing it as 1 variable like so: url =...
2
1436
by: raghuram.nidagal | last post by:
We use xmlhttp to query data from the server and also to submit data to the server to initiate transactions. The querying is a polling mechanism which is continuously polling the server. We notice...
0
1640
by: John Kay | last post by:
I am writing a java program that is sending a HTTP 1.1 request and getting a response from a web server. The request that I am sending is identical to the one in the browser, IE8. I am using...
0
6911
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7050
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7091
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
6966
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4787
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4488
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2988
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
564
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
185
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.