Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 01-21-2004, 12:16 AM   #1
LQ Newbie
Registered: Jan 2004
Posts: 16

Rep: Reputation: 0
Creating form with PHP


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">
<th>Username: </th>
<th><input type="text" name="username"> </th>
<th>Password: </th>
<th><input type="password" name="password"> </th>
<th colspan="2" align="right">
<input type="submit" value="Login">

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?

Old 01-21-2004, 02:11 AM   #2
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)


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 07:48 PM
PHP form help Zeppelin_Fan Programming 5 03-24-2005 05:47 PM
Simple PHP help with a form :-) 2782d4 Programming 3 12-17-2004 03:53 AM
PHP to sendmail from form lawadm1 Linux - Software 1 08-17-2004 12:55 AM
php/form kev82 Programming 0 02-25-2004 07:21 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:46 PM.

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