473,804 Members | 2,719 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_conten ts("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%00 m%001%00%5b%000 %00%5d%00.%00%2 3%00s%00u%00b%0 0f%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 1677
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_conten ts("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%00 m%001%00%5b%000 %00%5d%00.%00%2 3%00s%00u%00b%0 0f%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.co m
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.sympa tico.ca> wrote in message
news:11******** *****@corp.supe rnews.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_conten ts("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%00 m%001%00%5b%000 %00%5d%00.%00%2 3%00s%00u%00b%0 0f%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.sympa tico.ca> wrote in message
news:11******** *****@corp.supe rnews.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_conten ts("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%00 m%001%00%5b%000 %00%5d%00.%00%2 3%00s%00u%00b%0 0f%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(st r_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.co m
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
2550
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, radio, checkbox, and dropdown. When the form Submit button is clicked, I then need the input data either written to another location on the same page, or written to another page (a different frame would be fine)
3
7186
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 elements from all forms: var numberForms = document.forms.length; var formIndex;
3
5224
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 I want to access the submit button of the visible form, which is usually the last one, how is that done? Currently, I look for type=submit using DOM but it doesn't find anything and only loops through the first FORM elements. Sorry if this...
2
2253
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 MsgBox(strMsg, vbQuestion + vbYesNo, "Save Record?") = vbYes Then 'do nothing Else
6
1560
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 specifying. I'm trying to write a few functions that help me debug my script by writing variables to a text area in a popup window. I came up with the following code: var debug; var debugWindow;
5
14134
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
10812
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 type="text/javascript"> <!-- var theForm = document.forms;
5
4015
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
2997
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 hours on this and couldn't find the solutions, thats why I have to come with a hack. I have two forms, I made the first form invisible and let the second form visible.This form is for google custom search engine. I also tried with other test forms, but...
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10569
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10325
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10315
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10075
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9140
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7615
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5519
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4295
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.