473,396 Members | 1,816 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.

How do you get variable to the other side of a script

Hi Everyone,
I don't have very much experience programming at all, so bear with me. I
have a Service Request web form that is setup as follows:

Index.html Login Page-//Usernames on MySQL -->

trylogon.php-//Use $POST for Usernames and Passwords authenticates then
opens -->

Form.php-//Submit service request to MySQL -->

Add.php-//Adds info to the database, prints confirmation page.

This is all working fine. The one problem is that the "Form.php" page
makes them enter their Username again in the form. Users would like it to
automatically populate that with the Username they plugged into the Login
page. I don't know how to go about this? Some of the things I have tried
simply won't pass the variable for the Username to the Form after it goes
through trylogon.php. I have PHP 5.12, and global variables are turned
off by default. Any suggestions that you can offer a "newb"?

Thanks for any help you can offer?

pete

Jan 19 '06 #1
2 1301
rf
use sessions

Jan 19 '06 #2
pete horm wrote:
Index.html Login Page-//Usernames on MySQL -->

trylogon.php-//Use $POST for Usernames and Passwords authenticates then
opens -->

Form.php-//Submit service request to MySQL -->

Add.php-//Adds info to the database, prints confirmation page.

This is all working fine. The one problem is that the "Form.php" page
makes them enter their Username again in the form. Users would like it to
automatically populate that with the Username they plugged into the Login
page. I don't know how to go about this?

<snip>

Try replacing your

<input type="text" name="username">

with

<input type="text" name="username" value="<?php echo $username; ?>">

--
If you're posting through Google read <http://cfaj.freeshell.org/google>
Jan 19 '06 #3

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

Similar topics

7
by: Jonas Daunoravicius | last post by:
The subject pretty much sums up what I need to do. Here is what I have so far, but still can't figure out how to get it working: <script language="javascript" type="text/javascript"> function...
4
by: Jack | last post by:
Hello, <%@ Language=VBScript %> <% dim a a=10 'I want b=a at this place %> <Script language=VBScript> dim b </Script>
7
by: Donna Hawkins | last post by:
I want to use javascript to redirect to a URL which has been passed as a variable (in php). I have searched but cannot find any solution. I think this code is a basic redirect: <script...
2
by: Eric | last post by:
Hi, I've a problem with trying to retrieve a session variable in an include file. Basically, the main asp creates a session variable: <% Session("var1") = "Hello" %> And then when I click...
3
by: Parveen | last post by:
I have a boolean variable defined in the aspx.cs code for my webpage. I need to read the value of this variable in the javascript code that i have in the codebehind file. Is there a way to do...
2
by: Augusto Cesar | last post by:
Hello people. How can I Pass ASP Array variable to Javascript; I´m to trying this: <script language="JavaScript"> var x = new Array(10);
5
by: Jade | last post by:
I saw some web page saying I could do it this way in javascript: var iNumber = <%#publicvarname publicpropertyname %> but it doesn't seem to work. I have this piece of code here in...
4
by: Bob T | last post by:
Hi All, I am trying to pass a variable from my VB asp.net script (from for example Sub Page_Load in mypage.aspx.vb) to my Client side script. I have found and looked at a very good example...
6
by: Dan | last post by:
Excuse me if i'm being a bit thick here, but is it possible to reference a server side variable within an embedded js source file. For example, my test.js file contains alert('<%=tmpVar%>'); ...
1
by: Ranjan | last post by:
Hi, I want to assign javaScript variable to JSP variable. <Script> var conf=Confirm("Mess"); if(conf) { <% String str=conf; /// line 1 %> }
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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
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,...
0
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...
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.