You are here: Value (not) being retuned by a function « PHP « IT news, forums, messages
Value (not) being retuned by a function

Posted by MARG on 12/11/05 21:55

Hi,

I have this form:
http://www.tuxdoit.com/newsletter.php

If you care to check it, you'll see that
http://www.tuxdoit.com/formsResult.php

never returns the function value:

formsResult.php:
-------------------------------------
<?php
include('functions.php');
ini_set("display_errors","On");

$email = $_REQUEST['email'];

$emailResult = isEmailOk($email);

print($emailResult);

if ($emailResult == 1)
print('Email Ok');
else
print('Email is not Ok');

?>
--------------------------------

functions.php:
--------------------------------
<?php

function isEmailOk($email) {
print($email);
if (!eregi
("^([-!#\$%&'*+./0-9=?A-Z^_`a-z{|}~^?])+@([-!#\$%&'*+/0-9=?A-Z^_`a-z{|}~^?]+\\.)+[a-zA-Z]{2,6}\$",
$email))
return 1;

} // is EmailOk

?>
-------------------------------

Why is that happening ?

Any help would be apreciated.

Warm regards,
MARG

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация