473,387 Members | 1,512 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Abode Forms and PHP Script

Syl
I have a simple test html form at http://www.radiosport.ca/test/test.html

It use the POST method to send a name to a php script that prints the input
data in the $_POST array and from the raw input data

<?php $data = $_POST['name']; print "\$_POST: $data"; $data =
file_get_contents("php://input"); print "Raw Input: $data"; ?>

And I have a test pdf form that uses a HTTP Submit button - it also calls
the php script http://www.radiosport.ca/test/test.pdf

Using 'Robert' as the test name the output from the test html form is

$_POST: Robert
Raw Input: name=Robert

The Output from the test pdf form is

$_POST:
Raw Input:
%00f%00o%00r%00m%001%00%5b%000%00%5d%00.%00%23%00s %00u%00b%00f%00o%00r%00m%0
0%5b%000%00%5d%00.%00n%00a%00m%00e%00%5b%000%00%5d =%00R%00o%00b%00e%00r%00t

I thought the Adobe Form was suppose to send standard URL-encoded data using
the POST method the same as the html form.

Where have I made my mistake?
Can someone point me to a PHP script that processes a pdf form?
Jan 12 '06 #1
3 1660
Syl wrote:
I have a simple test html form at http://www.radiosport.ca/test/test.html

It use the POST method to send a name to a php script that prints the input
data in the $_POST array and from the raw input data

<?php $data = $_POST['name']; print "\$_POST: $data"; $data =
file_get_contents("php://input"); print "Raw Input: $data"; ?>

And I have a test pdf form that uses a HTTP Submit button - it also calls
the php script http://www.radiosport.ca/test/test.pdf

Using 'Robert' as the test name the output from the test html form is

$_POST: Robert
Raw Input: name=Robert

The Output from the test pdf form is

$_POST:
Raw Input:
%00f%00o%00r%00m%001%00%5b%000%00%5d%00.%00%23%00s %00u%00b%00f%00o%00r%00m%0
0%5b%000%00%5d%00.%00n%00a%00m%00e%00%5b%000%00%5d =%00R%00o%00b%00e%00r%00t

I thought the Adobe Form was suppose to send standard URL-encoded data using
the POST method the same as the html form.
It depends on the options you chose for the submit button...
Where have I made my mistake?
Can someone point me to a PHP script that processes a pdf form?


http://koivi.com/fill-pdf-form-fields/

http://koivi.com/fill-pdf-form-fields/tutorial.php

--
Justin Koivisto, ZCE - ju****@koivi.com
http://koivi.com
Jan 12 '06 #2
what you are going to get from $_POST is PHP's serialized string version of
an array. $_POST is an array. if you read between the %00's, it reads as
follows:

form1[0].#subform[0].name[0]=Robert

(and BTW, POST is just all the form data serialized from the browser thru
HTTP and read into STDIN in C - like typing at the keyboard almost)

"Syl" <jk***@sk.sympatico.ca> wrote in message
news:11*************@corp.supernews.com...
I have a simple test html form at http://www.radiosport.ca/test/test.html

It use the POST method to send a name to a php script that prints the
input
data in the $_POST array and from the raw input data

<?php $data = $_POST['name']; print "\$_POST: $data"; $data =
file_get_contents("php://input"); print "Raw Input: $data"; ?>

And I have a test pdf form that uses a HTTP Submit button - it also calls
the php script http://www.radiosport.ca/test/test.pdf

Using 'Robert' as the test name the output from the test html form is

$_POST: Robert
Raw Input: name=Robert

The Output from the test pdf form is

$_POST:
Raw Input:
%00f%00o%00r%00m%001%00%5b%000%00%5d%00.%00%23%00s %00u%00b%00f%00o%00r%00m%0
0%5b%000%00%5d%00.%00n%00a%00m%00e%00%5b%000%00%5d =%00R%00o%00b%00e%00r%00t

I thought the Adobe Form was suppose to send standard URL-encoded data
using
the POST method the same as the html form.

Where have I made my mistake?
Can someone point me to a PHP script that processes a pdf form?

Jan 15 '06 #3
[top posting fixed]

Jim Michaels wrote:

"Syl" <jk***@sk.sympatico.ca> wrote in message
news:11*************@corp.supernews.com...
I have a simple test html form at http://www.radiosport.ca/test/test.html

It use the POST method to send a name to a php script that prints the
input
data in the $_POST array and from the raw input data

<?php $data = $_POST['name']; print "\$_POST: $data"; $data =
file_get_contents("php://input"); print "Raw Input: $data"; ?>

And I have a test pdf form that uses a HTTP Submit button - it also calls
the php script http://www.radiosport.ca/test/test.pdf

Using 'Robert' as the test name the output from the test html form is

$_POST: Robert
Raw Input: name=Robert

The Output from the test pdf form is

$_POST:
Raw Input:
%00f%00o%00r%00m%001%00%5b%000%00%5d%00.%00%23%00s %00u%00b%00f%00o%00r%00m%0
0%5b%000%00%5d%00.%00n%00a%00m%00e%00%5b%000%00%5d =%00R%00o%00b%00e%00r%00t

I thought the Adobe Form was suppose to send standard URL-encoded data
using
the POST method the same as the html form.

Where have I made my mistake?
Can someone point me to a PHP script that processes a pdf form?

what you are going to get from $_POST is PHP's serialized string version of
an array. $_POST is an array. if you read between the %00's, it reads as
follows:

form1[0].#subform[0].name[0]=Robert

(and BTW, POST is just all the form data serialized from the browser thru
HTTP and read into STDIN in C - like typing at the keyboard almost)


Sure doesn't look like a serialized array to me, and if that is the
posted data, then php doesn't have anything to do with it...

However, if you use the following, you can come up with what was found
above:

echo rawurldecode(str_replace('%00','',($post)));

Simply using rawurldecode produces what looks like a binary string. Was
this PDF made using Adobe Designer?

--
Justin Koivisto, ZCE - ju****@koivi.com
http://koivi.com
Jan 16 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Richard | last post by:
**** Post for FREE via your newsreader at post.usenet.com **** HI, I am working on a project where I need to input data to a (local) HTML page using multiple form elements, such as text,...
3
by: Bart Van der Donck | last post by:
Hello, I have a dynamic page of which I don't know how many forms will be on it, neither which and how many elements will be in each form. I use the following java script to disable all...
3
by: brett | last post by:
Using DOM in IE, how can I loop through FORMs and access FORM elements in a specific form? For example, www.hotmail.com has about 13 forms. I believe the one displayed is dependent on the URL. If...
2
by: icedgar | last post by:
am using the following script in the BeforeUpdate area of a main form. Private Sub Form_BeforeUpdate(Cancel As Integer) Dim strMsg As String strMsg = "Do you wish to save your changes?" If...
6
by: taras.di | last post by:
Hi everyone, I've just spent the last 2 hours banging me head against the desk trying to figure this one out. I eventually figured out that sometimes a form doesn't exist for the popup I'm...
5
by: c676228 | last post by:
Hi everyone, my colleagues are thinking about have three insurance plans on one asp page: I simplify the plan as follow: text box:number of people plan1 plan2 plan3
5
by: Nathan Sokalski | last post by:
I have an ASP.NET application which is giving the following JavaScript error: 'theForm' is undefined However, when I do a View Source one of the <scriptelements is as follows: <script...
5
by: ankit1999 | last post by:
I have a problem, everytime i'm run this page http://click2travel.in/index.php i get the this error,,,
5
by: programmerboy | last post by:
I never had this kind of issue before and it is completely surprising. I have a usercontrol where I need 2 forms to make 1 form. When I have only 1 form it submits the page to itself. I have spent...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...

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.