"This is the php code I can't mimic: "

Really?   the code is super simple:

- Open connection to the database
- Take the posted value of "username", trim it, and make lower case
- Clean up the string to help prevent SQL injection attack
- Take that username and check against the database
- echo (Response.Write) the number of rows found
- Close the database connection


On Sep 28, 1:26 pm, factoringcompare <firstfacto...@googlemail.com>
wrote:
> OK, I am trying to get this example to work 
> :http://papermashup.com/jquery-php-mysql-username-availability-checker/
>
> This is the php code I can't mimic:
>
> <?php
> include("dbConnector.php");
> $connector = new DbConnector();
>
> $username = trim(strtolower($_POST['username']));
> $username = mysql_escape_string($username);
>
> $query = "SELECT username FROM usernameCheck WHERE username =
> '$username' LIMIT 1";
> $result = $connector->query($query);
> $num = mysql_num_rows($result);
>
> echo $num;
> mysql_close();
>
> On Sep 28, 2:16 pm, MorningZ <morni...@gmail.com> wrote:
>
> > Take an example page in php that you want to mimic, and simply have
> > asp send back to the browser the same information
>
> > On Sep 28, 3:58 am, factoringcompare <firstfacto...@googlemail.com>
> > wrote:
>
> > > Hi,
>
> > > Reasonably new to web building. I am now just updating my site with
> > > jQuery (first time user).
>
> > > I would like to implement an Ajax username checker on a new client
> > > registration form. All the tutorials and examples I can find use
> > > jQuery and php. Unfortunately, I have taught myself Access and ASP and
> > > have no knowledge of php. At this stage I want to stick with ASP and
> > > Access and look to upgrade the DB as another project.
>
> > > Can any body point me in the right direction to obtain some code.
>
> > > Kind regards.- Hide quoted text -
>
> > - Show quoted text -

Reply via email to