LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 01-20-2004, 11:16 PM   #1
absolut
LQ Newbie
 
Registered: Jan 2004
Posts: 16

Rep: Reputation: 0
Creating form with PHP


Hi,

I'm trying to create a simple form with PHP, however, there's this one problem: it seems that I couldn't obtain the user-input value.

For example I have this piece of code within my form.php:

<form action="<?=$PHP_SELF?>" method="POST">
<p align="center">Please login</p>
<table align="center" border="0">
<tr>
<th>Username: </th>
<th><input type="text" name="username"> </th>
</tr>
<tr>
<th>Password: </th>
<th><input type="password" name="password"> </th>
</tr>
<tr>
<th colspan="2" align="right">
<input type="submit" value="Login">
</form>

The next time I reference to $username, it is NOTHING! So it never takes the user-input value from the textbox "Username".

Any idea where I might be wrong in here?

Thanks!
 
Old 01-21-2004, 01:11 AM   #2
Guru3
Member
 
Registered: Sep 2003
Location: //home/sweden
Distribution: RedHat 9, Fedora Core 1
Posts: 360

Rep: Reputation: 31
You need to submit it to another php, so that the values get sent somewhere, then you can do stuff to them... Or, I don't know, try that first and see what happens before you try and start self submitting. (I'm not a php expert my I try and help)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
No form output in PHP jabfinger Programming 2 07-15-2005 06:48 PM
PHP form help Zeppelin_Fan Programming 5 03-24-2005 04:47 PM
Simple PHP help with a form :-) 2782d4 Programming 3 12-17-2004 02:53 AM
PHP to sendmail from form lawadm1 Linux - Software 1 08-16-2004 11:55 PM
php/form kev82 Programming 0 02-25-2004 06:21 PM


All times are GMT -5. The time now is 03:21 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration