Welcome to WebmasterWorld Guest from 54.158.195.220

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

how do i pass perl form to php form

i need to code the php form to accept the perl dat via the post method

     
1:01 pm on Mar 25, 2011 (gmt 0)

New User

5+ Year Member

joined:Mar 25, 2011
posts: 3
votes: 0


I need to design php page form to accept data passed to it via a perl form bellow is an example of the perl page.

#!/usr/bin/perl
use CGI qw(:all);

$total=param('total');
$invoice=param('invoice');


print header;

print <<"HTML";
<HTML><HEAD><TITLE>Secure Online</TITLE><script LANGUAGE="JavaScript">
self.moveTo(0,0)
self.resizeTo(screen.availWidth,screen.availHeight);
</script>
</HEAD>
<BODY onLoad="document.rrrr.submit()">

<form method="POST" name="rrrr" action="http://localhost/index1.php">
<INPUT NAME="mer_url_idx" TYPE="HIDDEN" VALUE="1">
<INPUT NAME="mer_id" TYPE="HIDDEN" VALUE="1111111">
<INPUT NAME="num_items" TYPE="HIDDEN" VALUE="10">
<INPUT NAME="item1_desc" TYPE="HIDDEN" VALUE="Invoice: $invoice Company Total">
<INPUT NAME="item1_price" TYPE="HIDDEN" VALUE="$total">
<INPUT NAME="item1_qty" TYPE="HIDDEN" VALUE="1">
</form>
</BODY>
</HTML>
3:02 am on Mar 26, 2011 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Oct 4, 2001
posts: 1263
votes: 12


What you posted should work, the data is being sent by the browser, not perl, so there are no issues with format.
4:12 am on Mar 26, 2011 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:May 6, 2008
posts:2011
votes: 0


<?php

//index1.php

$mer_url_idx = $_POST['mer_url_idx'];
//..repeat the others

echo "mer_url_idx: ".$mer_url_idx."<br>";
//repeat the others

?>
5:51 am on Mar 29, 2011 (gmt 0)

New User

5+ Year Member

joined:Mar 25, 2011
posts: 3
votes: 0


thanks it worked perfectly