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

data into PHP variable

Hi,

How to get data from a text field into php variable without using POST variables because I need the text field value in the same PHP page.

With regards
Feb 5 '08 #1
4 1779
Markus
6,050 Expert 4TB
You can POST the form to the same page
<form action="">

Othewise, you'll have to use some client side code.
Feb 5 '08 #2
Thank u.

Can you please give me some idea of client side code
Feb 5 '08 #3
ifedi
60
Hi,

How to get data from a text field into php variable without using POST variables because I need the text field value in the same PHP page.

With regards
Please clarify the question. What do you mean you 'need the text field value in the same page?
Perhaps you need to draw out the field values from a database via php, but send the form variables back into the database through a different php script either elsewhere on the same page, or on another page(specified in the form 'action' attribute).

But basically, you can only send out form variable values with POST and GET superglobals.

If you make it clearer, I'll make this clearer.
Regards,
Ifedi.
Feb 8 '08 #4
[quote=ifedi]Please clarify the question. What do you mean you 'need the text field value in the same page?

Hi there..

If you need the text value into php variable in the same page check out this code..
but remember that method 'get' is default. No need to specify.

<form name="f1">
<input type="text" name="t" value="">
<?php
$a = $_GET['t'];
echo $a;
//you can check same php variable value in t2 textbox by just uncommenting.
?>
<!-- <input type="text" name="t2" value="<?php // echo $a; ?>"; -->
<input type="submit" name="submit" value="submit">
</form>

Hope this will help you out
vsvnmurthy
Feb 9 '08 #5

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

Similar topics

3
by: Sandros | last post by:
Background: I'm collecting usability statistics for a group of applications. Each count has the following attributes: date, application, major heading, minor heading, count. My intent is to pull...
3
by: Daniel Graifer | last post by:
Why doesn't c++ support virtual data? It supports class data of type pointer to function (that's what virtual functions really are). In terms of implementation, why can't I have other types of...
10
by: Zap | last post by:
Widespread opinion is that public data members are evil, because if you have to change the way the data is stored in your class you have to break the code accessing it, etc. After reading this...
7
by: Steve Mauldin | last post by:
I have a public variable that is declared in a public module. This Variable is stored into a Session variable and used to pass data from page to page. I am seeing on my local development box that...
4
by: Sarah Marriott | last post by:
Our website contains session variables that are used to validate if a user is logged in etc. We have found that these variables are randomly lost while navigating the website. We set up some...
7
by: Arpan | last post by:
The .NET Framework 2.0 documentation states that An Object variable always holds a pointer to the data, never the data itself. Now w.r.t. the following ASP.NET code snippet, can someone please...
8
by: CedricCicada | last post by:
Greetings! Here's my script: ######## start of script class ScannerCommand: taskName = '' scanList = def __init__(self):
4
by: Basilisk96 | last post by:
This topic is difficult to describe in one subject sentence... Has anyone come across the application of the simple statement "if (object1's attributes meet some conditions) then (set object2's...
4
by: Debbiedo | last post by:
My software program outputs an XML Driving Directions file that I need to input into an Access table (although if need be I can import a dbf or xls) so that I can relate one of the fields...
3
by: chandra.krothapalli | last post by:
Hi, I am writing a program to read database logs using db2Readlog/ db2ReadLogNoConn API. I am able to parse the data of "FIXED format data" and link them to appropriate columns for a given...
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:
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
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...
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
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,...
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...
0
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...
0
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,...

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.