473,769 Members | 3,755 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help with variables and POST

Hello,

Can anyone help with this?

On my online order form, I need to send a few variables to my
credit-card processor. These variables are for non-secure customer
comments, and will be sent through the usual metod, i.e.,
<form action="https://orderpage.ic3.c om/hop/orderform.jsp"
method="post">

However, one variable is a text-area box for a detailed customer
comment, and this variable can get pretty long. But my credit-card
processor has a 256 byte maximum length limit for all POSTed
variables. However, I can add as many of these 256-byte variables as I
like.

So how can I accomplish this in the most simple, efficient, and
elegant manner? How can I break up the text-area vaiable into 256-byte
pieces and then send these variables via POST along with all of the
other form variables which will be POSTed through the usual HTML
means?

Thank you.

Sincerely,

Robert

If you reply directly to this question, please send to
ro********@star center.com .
Jul 17 '05 #1
3 2516
red
Robert wrote:
Hello,

Can anyone help with this?

On my online order form, I need to send a few variables to my
credit-card processor. These variables are for non-secure customer
comments, and will be sent through the usual metod, i.e.,
<form action="https://orderpage.ic3.c om/hop/orderform.jsp"
method="post">

However, one variable is a text-area box for a detailed customer
comment, and this variable can get pretty long. But my credit-card
processor has a 256 byte maximum length limit for all POSTed
variables. However, I can add as many of these 256-byte variables as I
like.

So how can I accomplish this in the most simple, efficient, and
elegant manner? How can I break up the text-area vaiable into 256-byte
pieces and then send these variables via POST along with all of the
other form variables which will be POSTed through the usual HTML
means?

Thank you.

Sincerely,

Robert

If you reply directly to this question, please send to
ro********@star center.com .

in the example below,input(), form() and html() are my own functions (I
hate writing html) but its obvious what they do so I won't show
them.This is enough to give you the idea.

$data = str_split($_POS T[text_area_data],256);
$num=0;
foreach($data as $d){
$name="comment_ part_$num";
$num++;
$fields.=input( 'hidden',$name, $d);
}
$fields.=input( 'submit','submi t','submit');
$action= "credit_card_pr ocessor.php";
$form=form($fie lds,$action);
html($form);
Jul 17 '05 #2
red <gr*****@reenie .org> wrote in message news:<wm******* *************** @news.easynews. com>...
Robert wrote:
Hello,

Can anyone help with this?

On my online order form, I need to send a few variables to my
credit-card processor. These variables are for non-secure customer
comments, and will be sent through the usual metod, i.e.,
<form action="https://orderpage.ic3.c om/hop/orderform.jsp"
method="post">

However, one variable is a text-area box for a detailed customer
comment, and this variable can get pretty long. But my credit-card
processor has a 256 byte maximum length limit for all POSTed
variables. However, I can add as many of these 256-byte variables as I
like.

So how can I accomplish this in the most simple, efficient, and
elegant manner? How can I break up the text-area vaiable into 256-byte
pieces and then send these variables via POST along with all of the
other form variables which will be POSTed through the usual HTML
means?

Thank you.

Sincerely,

Robert

If you reply directly to this question, please send to
ro********@star center.com .

in the example below,input(), form() and html() are my own functions (I
hate writing html) but its obvious what they do so I won't show
them.This is enough to give you the idea.

$data = str_split($_POS T[text_area_data],256);
$num=0;
foreach($data as $d){
$name="comment_ part_$num";
$num++;
$fields.=input( 'hidden',$name, $d);
}
$fields.=input( 'submit','submi t','submit');
$action= "credit_card_pr ocessor.php";
$form=form($fie lds,$action);
html($form);


Thank you for the reply. However, could you explain the input(),
form() and html()functions ?

Sincerely,

Robert
ro********@star center.com
Jul 17 '05 #3
Robert wrote:
red <gr*****@reenie .org> wrote in message news:<wm******* *************** @news.easynews. com>...
Robert wrote:
Hello,

Can anyone help with this?

On my online order form, I need to send a few variables to my
credit-card processor. These variables are for non-secure customer
comments, and will be sent through the usual metod, i.e.,
<form action="https://orderpage.ic3.c om/hop/orderform.jsp"
method="post ">

However, one variable is a text-area box for a detailed customer
comment, and this variable can get pretty long. But my credit-card
processor has a 256 byte maximum length limit for all POSTed
variables. However, I can add as many of these 256-byte variables as I
like.

So how can I accomplish this in the most simple, efficient, and
elegant manner? How can I break up the text-area vaiable into 256-byte
pieces and then send these variables via POST along with all of the
other form variables which will be POSTed through the usual HTML
means?

Thank you.

Sincerely,

Robert

If you reply directly to this question, please send to
ro********@s tarcenter.com .
in the example below,input(), form() and html() are my own functions (I
hate writing html) but its obvious what they do so I won't show
them.This is enough to give you the idea.

$data = str_split($_POS T[text_area_data],256);
$num=0;
foreach($da ta as $d){
$name="comment_ part_$num";
$num++;
$fields.=input( 'hidden',$name, $d);
}
$fields.=inpu t('submit','sub mit','submit');
$action= "credit_card_pr ocessor.php";
$form=form($f ields,$action);
html($form) ;

Thank you for the reply. However, could you explain the input(),
form() and html()functions ?


They just write html tags. Sorry, I assumed you already knew how to do
that.
A form has input statments to gather data to send to the next page.

A)
$data = str_split($_POS T[text_area_data],256);
This gets the data from the previous page, devides the data into 256
byte chinks and puts the chunks into the $data array.

B)
$num=0;
foreach($data as $d){
$name="comment_ part_$num";
$num++;
$fields.=input( 'hidden',$name, $d);
}
This loop iterates through the $data array and makes each piece of data
the value of a hidden field in an input statement. It essentially does
something like this:
$fields.="<inpu t type='hidden' name='comment_p art_3' value='$d'>";
where $d is one 256 byte chunk of data. Each hidden field is given a
unique name: comment_part_0, comment_part_1, comment_part_2 etc.

C)
$fields.=input( 'submit','submi t','submit');
this adds a submit button: "<input type='submit' name='submit'
value='submit'>

D)
$action= "credit_card_pr ocessor.php";
$form=form($fie lds,$action);
This puts the hidden fields and the submit button between form tags with
the action set to the file that will process your data.
$form="<form action = 'credit_card_pr ocessor.php'> $fields</form>";

E)

html($form);
This adds html tags to the argument . It does other things so that the
page validates, but we don't need to get into that to answer your question.
Sincerely,

Robert
ro********@star center.com

Jul 17 '05 #4

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

Similar topics

3
3271
by: laurie | last post by:
Hi all, I'm trying to help out a friend who has inherited a client with a PHP shopping cart application. Neither of us know PHP, but I've been muddling my way through, trying to get these old scripts working on a new server with the most recent version of PHP. I've pretty much taken care of all the various errors that were popping up. Most only pointed out out non-fatal undefined or assumed variables. I've been able to cure most of...
31
14349
by: da Vinci | last post by:
OK, this has got to be a simple one and yet I cannot find the answer in my textbook. How can I get a simple pause after an output line, that simply waits for any key to be pressed to move on? Basically: "Press any key to continue..." I beleive that I am looking for is something along the lines of a....
5
2478
by: David M Loraine | last post by:
I am a sql novice and would appreciate any help with the following problem. In a table I have property addresses stored in 6 fields. Field6 always hold the Post Code. However, fields 4 and 5 are sometime NULL. Using the desktop integration package we have which interfaces with MS Word when printing an address in a letter the end results often end up looking like this. 1 Any Street AnyTown
15
3358
by: Alfonso Morra | last post by:
Hi, I have some code from an example, that I want to retrofit into my project. The code from the example has the following line: SharedAppenderPtr myAppender( new RollingFileAppender("MyAppender")) I want to move this line of code to a constructor in a wrapper class, so that I can determine the appropriate Appender name during the object's
8
5480
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- Hello, I have a very simple problem but cannot seem to figure it out. I have a very simple php script that sends a test email to myself. When I debug it in PHP designer, it works with no problems, I get the test email. If
4
2664
by: DOTNET | last post by:
Hi, Anybody help me regarding this error: I am assigning the values to the session variables when the button is clicked and passing these session variables to the next page and when I am printing these session variables they are printing. After that I am assigning these things in hidden object and in the form submit action I am receiving these hidden values like the following:
11
1908
by: Frankie | last post by:
Hello: New user here...first post to group. I'm getting an SQL syntax error when I try to run the following query: $query = sprintf("SELECT itemNumber, entryDate, modifyDate, thumbnailURL, title, price FROM '%s' WHERE itemNumber = '%s'", $_POST, $_POST);
4
1121
by: Jacob.Bruxer | last post by:
Hi, I'm pretty new to Visual Basic and was wondering if anyone could give some general advise on how to conserve memory when running a Visual Basic program that I've created. I keep getting a "Win32 exception was unhandled" error, and I'm pretty sure resource usage is the problem. This might be way too general of a question, so I'll try to explain what it is I'm trying to do as briefly as I can. Basically, my program reads a text file...
6
3360
by: AppleBag | last post by:
I'm having the worst time trying to login to myspace through code. Can someone tell me how to do this? Please try it yourself before replying, only because I have asked this a couple of times in the past in other places, and while the help was much appreciated, it seemed everyone just wanted to 'theoretically' explain how to do it, but when I tried to do it myself, I couldn't login. I want to simply pass the email address and password to...
0
9583
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
9423
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10210
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...
1
9990
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
9860
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
6668
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5297
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...
0
5445
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3955
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.