Re: another php question
- From: "ZeldorBlat" <zeldorblat@xxxxxxxxx>
- Date: 12 Sep 2005 20:31:21 -0700
Looks pretty good so far.
You can check if a form variable represents a numeric string by using
is_numeric(). It's a little bit clearer and probably a little bit
faster than using ereg().
You've already got the code in place to check that the fields are not
empty and that $mobile contains only numbers. So the only thing left
is to lookup $code in the database. The next section might look
something like this (pseudocode):
$sql = "select count(*) items from code_table where code = '$code'";
//Run the query
if (items == 0) {
header( "Location: http://www.mysite.com/badcode.php" );
}
//Send email
//delete the row from the database
.
- Follow-Ups:
- Re: another php question
- From: needaticker
- Re: another php question
- References:
- another php question
- From: needaticker
- another php question
- Prev by Date: another php question
- Next by Date: Re: KARAOKE SINGERS WANTED - the world is listening!
- Previous by thread: another php question
- Next by thread: Re: another php question
- Index(es):
Relevant Pages
|