473,549 Members | 2,639 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

select from radio button + enter username = open user profile

Hi

I have 4 radio buttons. each button to determine which page to go to. But
before page open user enters username in a text box. So when submitted, Page
opens relevant to that user displaying selected page.

I have no idea how to achieve this, and a good example would be greatly
appreciated.
Page 1: <radio button> >>>>>>>>>> this page to go to page1.php (this is a
table of user records 1)
Page 2: <radio button> >>>>>>>>>> this page to go to page2.php (this is a
table of user records 2)
Page 3 :<radio button> >>>>>>>>>> this page to go to page3.php (this is a
table of user records) 3
Page 4: <radio button> >>>>>>>>>> this page to go to page4.php (this is a
table of user records 4)

Enter Username: [text box] >>>>>>>> any user with their username

[submit]
Result should be :

If User FAB5 selects radio button 1 >>>>>>>>>. to display FAB5's page1.php

Thank you

Jul 17 '05 #1
3 3874
M.E. wrote:
Result should be :

If User FAB5 selects radio button 1 >>>>>>>>>. to display FAB5's page1.php

Thank you


Put the username box first, then the radio checkboxes. And for each
checkbox, put a javascript with onClick=documen t.form.submit. (or something
like this).

Of course, you should check that the username is not empty. (can be done
with javascript or with php).
--
marius

http://marius.me.uk/
Free your mind; the rest will follow.
Jul 17 '05 #2
M.E. wrote:
I have 4 radio buttons. each button to determine which page to go to. But
before page open user enters username in a text box. So when submitted, Page
opens relevant to that user displaying selected page.

I have no idea how to achieve this, and a good example would be greatly
appreciated.


Submit the form to

<?php
$new_page = false;
if (isset($_POST['radio1']))
$new_page = '/page1.php?user= ' . $_POST['username'];
// same thing for page2, page3, and page4
if ($new_page) {
header('Locatio n: ' . $full_url . $new_page);
exit('Redirecte d <a href="' . $full_url . $new_page . '">here</a>.');
}
// error message
?>
--
--= my mail box only accepts =--
--= Content-Type: text/plain =--
--= Size below 10001 bytes =--
Jul 17 '05 #3
Thank you great help to me.
"Pedro Graca" <he****@hotpop. com> wrote in message
news:c2******** *****@ID-203069.news.uni-berlin.de...
Jul 17 '05 #4

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

Similar topics

1
5232
by: JT | last post by:
I have an input form for which I've created a "matrix" for user input. Basically, the user chooses a radio button and then through javascript, a select box is displayed to define a value for that radio option, like so: Choice: (Radio1) type: (select box1) Choice: (Radio1) type: (select box2) Choice: (Radio1) type: (select box3) Choice:...
4
7384
by: bobsawyer | last post by:
I've been building a series of SELECT lists that are populated dynamically using HTTPRequest. Things are going pretty well, and I've got the whole thing working flawlessly in Mozilla/Firebird. Unfortunately, Internet Explorer doesn't quite work as expected -- it gives me an "invalid argument" error that I don't know how to fix. Here's the...
1
2964
by: Joe Attardi | last post by:
Hi all, On a form on one of my pages I have two <select> elements, and each one is paired up with a radio button. The idea is to choose an item from one list or the other and select the radio button of the list you want to use. I'm using JavaScript to automatically select the radio button corresponding to a list when you click on the...
0
1879
by: Sid DeLuca | last post by:
I'm modifying the WSE2 HOL sample to develop my web service. I'm able to get the client application's username token encrypted on the way out (outputTrace.webinfo), but not on receipt from the server (inputTrace.webinfo). The HOL manual mentions adding the wse:UsernameToken() to the policyCache.config on the client, but not on the server. ...
2
2560
by: SFM | last post by:
I just want a simple datareader, that i can read the value returned from a select statement executed on a SQL server 2005 db. The code below should work in, but email= rdr.ToString(); when i want to read some data a get a exception saying: System.InvalidOperationException was unhandled by user code Message="Invalid attempt to read when no...
16
2729
by: Richard Maher | last post by:
Hi, I have this Applet-hosted Socket connection to my server and in an ONevent/function I am retrieving all these lovely rows from the server and inserting them into the Select-List. (The on screen appearance of the Select List grows for the first 5 rows then the scroll bar appears if there's more). So far so good. . . The problem is...
1
2805
by: runway27 | last post by:
hi i have registration form where user selects from a drop down to select their area code apart from filling other details in the form. in the next page which is a confirmation page i would like to display the select option that a user choose in the first page i am able to display this using a textfield however i would like to display using the...
2
2801
by: runway27 | last post by:
i am using a self submitting form <form action="<?php echo $_SERVER; ?>" method="POST" id="test2" name="test1"> i need to do a validation of textfields, checkboxes, radio buttons i am able to read, display and validate textfields after the form has been submitted however i am getting an error for checkbox and radio buttons.
2
4686
by: shapper | last post by:
Hello, I know that only authenticated users has a UserName. In Anonymous users there is an ID. If I am not wrong when getting a profile of a user, if the user is authenticated the UserName is used. If it is anonymous it is used its ID that is also stored on a cookie. What is the correct way to get the UserName or Anonymous user ID of
0
7532
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...
0
7462
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...
0
7730
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. ...
0
7975
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7492
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...
0
6059
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5381
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
1
1957
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
1
1069
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.