473,385 Members | 1,429 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,385 software developers and data experts.

combining textfields to form a variable data and thend sending through URL

Hi,

I am trying to get a couple of text field entered in the text boxes and am then wanting to concatenate the data into one PHP variable. Finally i want to send the php variable in the action command through the URL of the next page. please let me know how to do this.

Expand|Select|Wrap|Line Numbers
  1. <p align="center">
  2.                                                      <input name="textfield" type="text" size="5" maxlength="3"> 
  3.                                                      &nbsp; . &nbsp; 
  4.                                                      <input name="textfield2" type="text" size="5" maxlength="3"> 
  5.                                                      &nbsp; . &nbsp;
  6.                                                      <input name="textfield3" type="text" size="5" maxlength="3"> 
  7.                                                      &nbsp; . &nbsp;
  8.                                                      <input name="textfield4" type="text" size="5" maxlength="3">
  9.                                                      &nbsp;&nbsp;</p>
  10.  
  11.                                     <?PHP 
  12.                                     $IP = echo  "'textfield'.'textfield2'.'textfield3'.'textfield4'";
  13.                                     ?>
  14.  
the above code is how i am trying to concatenate the different textboxes data into one PHP variable. Please let me know if i am doing it incorrectly.


Now I want to pass that variable as a paramter in action command as location.php?IP=$IP... something like this. Please help.
Expand|Select|Wrap|Line Numbers
  1. <form name="contact_form" method="get" action= "location.php" onsubmit="return validate_form ( );">
Oct 3 '08 #1
2 1796
Markus
6,050 Expert 4TB
You managed to get one set of code tags right. Remember it's [code] that format.
Oct 3 '08 #2
Atli
5,058 Expert 4TB
Hi.

I think a tutorial or two about HTML forms would help.
This is pretty basic stuff and there is no shortage on information on this topic online. (Google never fails)

Maybe this article could get you started.
Oct 4 '08 #3

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

Similar topics

3
by: R.G. Vervoort | last post by:
I would like to select an option in a pulldown, select a record in a mysql database depending on the pulldown selection and then put the data from the record in the textfields. I can retrieve...
15
by: Phillip Rhodes | last post by:
Hi all, I have a question I hope someone can help me with: I'm doing some communication over a socket, and have need to send and receive values of type double. I'm doing everything in terms of...
1
by: Ed | last post by:
Hi, I have an html page with a div element within a form for dynamically creating textfields. The problem is when I click a link on the page, or the submit button, then click the back button,...
3
by: Alex | last post by:
Hi all, We're importing data from a propriatery database, and below is a snippet of several lines: DateTime AcctNumber PtName Notes 12-23-2003 00432234 Smith, John Patient arrived from...
11
by: Johnny | last post by:
I'm a rookie at C# and OO so please don't laugh! I have a form (fclsTaxCalculator) that contains a text box (tboxZipCode) containing a zip code. The user can enter a zip code in the text box and...
1
by: Rich Wahl | last post by:
Ok, This may sound like a noob question, but I have an application, that asks the user to fill in fields from a pre-generated list of possibilities. And upon clicking submit, the user is...
27
by: Scott | last post by:
I've been trying to come up with a way to ensure user input is coming from the form on my site, and not auto-submitted from elsewhere, and I don't want to use the "enter the code shown in the...
7
by: h7qvnk7q001 | last post by:
I'm trying to implement a simple server-side form validation (No Javascript). If the user submits a form with errors, I want to redisplay the same form with the errors highlighted. Once the form...
1
by: starter08 | last post by:
Hi, I have a C++ routine(client-side) which uploads an xml file to a web server by making a socket connection and sending all the post request through that socket. On the server side I have a cgi...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.