Hi all,
I have an issue here.
There is a link "My plan" in the php page1. On clicking this link directs to a form which has some entries that has to be filled by the user.And once the user fills the form and clicks the submit button the entries will be stored in the database.
What I need is, when the user fills the form and submits the form once all the form elements should be disabled. If the user again clicks the "My plan" link, the form elements should be disabled. I know that this can be done by recognizing the user_id, since this will be unique. But how exactly can I do this. Here is the code I am using,
test1.php - <body>
-
<?php
-
$userid="45367";
-
echo "<a href='test2.php?userid=$userid'>My plan</a>";
-
?>
-
</body>
-
</html>
test2.php - <html>
-
<body>
-
<?php
-
$userid = $_GET['userid'];
-
?>
-
<form name="form1" action="test3.php" method="post">
-
Name : <input type="textbox" name="name">
-
Age : <input type="textbox" name="age">
-
Sex : <input type="checkbox" name="sex">
-
<input type="submit" value="GO">
-
</form>
-
</body>
-
</html>
Please help
WIth regards
1 1292
It is not really clear to me what you want to do here. Your test2.php is going to invoke the script test3.php and your user will then see whatever test3.php sends back to the browser as a response. If you want to echo the values that the user has inputted with test2.php, you can do it simply using other kinds of html tags rather than input tags. Or you could show them as the exact same input tags, but specify in the response of test3.php that these inputs are disabled, by adding the "disabled" keyword:
<input type="text" name="fieldname " value="fieldval ue" disabled />
You also might want test2.php to actually invoke test2.php again, with scripting to either show the input fields again to the user in the event the user did not enter something correctly, or if the fields were entered correctly, to perform the next step and show the user whatever test3.php would have shown.
Steve, Denmark
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Perttu Pulkkinen |
last post by:
What si the best and MOST BROWSERCOMPATIBLE way of making elements disabled
for the user? Also considering different kind of elements: textfields,
selects, radiobuttons and textareas. This is what I have had, its quite okay
in IE but not good enough for Netscape.
- I remember there was problem with setAttribute(wich would looked natural
pair to removeAttribute) so I used disabled = "disabled" instead.
function bluron(form,ele)
|
by: omidmottaghi |
last post by:
I need to disable/enable form elements in my form.
the code i was developed works fine in FF, but in IE, its behaviour is
very strange!!
in the form, we have a lot of checkboxes, all of them named like
"xyz_np".
in front of each checkbox, we have some fields, named "xyz"
this is my JS code.
after clicking on checkboxes:
|
by: Jason Galvin |
last post by:
I would like to disable the auto-populating feature (remembers form
element text between post-backs) when creating a .NET form.
I have succeeded in disabling auto-populate by creating my controls
during PreRender, but that becomes highly cumbersome. Is there a way
to explicitly turn off auto-populate?
I'm pretty sure the form isn't getting auto-populated by the ViewState
mechanism, because I've specifically set EnableViewState to...
|
by: John Dalberg |
last post by:
I have a webpage with a form. Depending on user selections at the top of
the page, the page will disable sections of the form. My plan is to put
each section between a <div></div>. Each section contains some collection
of form elements.
So if the user does not select some criteria, the related section of the
form gets disabled. In a typical Windows type of application these elements
get disabled and greyed out. What's the best way to do...
|
by: dougawells |
last post by:
Hi-
I'm wanting to have a set of radio buttons disabled when a form is
displayed, then if they check another specific radio button, those
would become enabled. I've tried setting it via
window.document.formname.radiogroup.disabled="true"; (or false) - but
that doesn't seem to work. I've seen this done with text boxes, but not
with radio buttons. Can anyone give any help?
Thanks
| |
by: shankwheat |
last post by:
I have a function which passes text from txtdebt to debtsbox which
works fine. However, I want to add code which examines the value of
debtsbox and if any of the values the user entered contain the string
"d" then I want to emable rblDebts which is disabled when the page
loads. This part is not working (no errors) and I'm not sure why.
Thanks.
<script type="text/javascript" language="JavaScript">
<!-- Begin
oldvalue = "";
|
by: Sonnich |
last post by:
Hi all!
Say, I have <buttonor <input type="submit">, how do then disable
them once they are clicked?
I could not find the right thing on the net :-(
S
|
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...
|
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,...
|
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...
|
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,...
| |
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...
|
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...
|
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: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |