First, thanks to all who offered suggestions with my simple ereg
question. I have been unable to get anything to work properly in
spite of many good suggestions. The problem I want to solve is to
ensure that input fields have either an integer number or are blank
before the program proceeds.
John W. Holmes wrote:
I'd like to verify input data transferred from a form and make sure it
is numeric data or null before my program executes. I am using this
syntax, which doesn't work:
for ($i=1;$i=3;$i++)
{
if (ereg('[0-9]+','$_POST[gamt_$i]'))
{
continue;
}
else
{
Ernest E Vogelsinger wrote:
At 01:01 24.02.2003, Robert E. Harvey, M.D. said:
[snip]
if (is_numeric($_POST[gamt_$i]) or empty($_POSTgamt_$i))
or this:
if (is_numeric($_POST[gamt_$i]) || empty($_POSTgamt_$i))
I get this error message (my if statement
This is a test message. I sent a real message last night and apparently
it didn't make it to the server.
Bob
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hello folks,
I'd like to verify input data transferred from a form and make sure it
is numeric data or null before my program executes. I am using this
syntax, which doesn't work:
for ($i=1;$i=3;$i++)
{
if (ereg('[0-9]+','$_POST[gamt_$i]'))
{
continue;
}
else
{
die(Non-numeric
Hello folks,
I'd like to verify input data transferred from a form and make sure it
is numeric data or null before my program executes. I am using this
syntax, which doesn't work:
for ($i=1;$i=3;$i++)
{
if (ereg('[0-9]+','$_POST[gamt_$i]'))
{
continue;
}
else
{
Hi folks,
I am trying to transfer data from a select list and am having problems
with special characters stopping the transfer. The data is presented in
a form as follows:
$query = SELECT algen FROM allist WHERE altyp = 'W' ORDER BY algen;
$result_1 = mysql_query($query)
or die
Jason Sheets wrote:
You're problem is that you are enclosing your value for your option
tags with single quotes ('), when you fetch the value from the database
the single quote in 's ends the value='' assignment in your HTML. You
can use echo option value=\$algen\$algen; which will solve your
I'm running PHP 4.2.2 and I'm having trouble with the printf()
function. I want to be able to print data in space padded fields with
the alpha strings left justified and the numeric strings right
justified. For some reason I can't get printf() to pad with spaces. It
pads with -s and right
9 matches
Mail list logo