|
Posted by Mike G. on 08/16/06 13:36
If it's a post method form, you'll need to access the data via the
$_POST array.
<?php
if(empty($_POST)) {
die('Please use a form to access this document.');
}
else {
$username = $_POST['username'];
$sql = "SELECT count(id) WHERE username='$username' ";
// the rest of your code goes here...
}
?>
Cheers,
Mike G.
Danny wrote:
> Hi all,
>
> I'm working on registration frm..whr i've a text box to enter user ID
> and beside tht i put a button to check the availability of that
> username in my database. My problem is how can i take the text box data
> and submit to the php script. I'm able to access the data(username) by
> using JavaScript but could not able to post that(usrname) to the PHP
> script.
>
> Pls hlp in this regard.
>
> thanks,
> Danny.
Navigation:
[Reply to this message]
|