List Info

Thread: note 78028 added to functions.returning-values




note 78028 added to functions.returning-values
user name
2007-09-24 17:57:00
mmamedov ::> pub [at] turkmenweb d0t c0m
im not sure if what you are doing is right...try this:

<?php
function isValid($vartocheck)
{
   if($vartocheck == true)
   {
      return 1;
   }

   else
   {
      return 0;
   }
}
?>

Then in your code:
<?php
$var = isValid($var1=$var2)
if($var == 0)
{
   // Show Error
}

else if($var == 1)
{
   // Show success
}
?>
----
Server IP: 87.124.64.96
Probable Submitter: 86.20.187.216
----
Manual Page -- http://www.php.net/manual/en/functions.returning-valu
es.php
Edit        -- https://master
.php.net/note/edit/78028
Del: integrated  -- h
ttps://master.php.net/note/delete/78028/integrated
Del: useless     -- http
s://master.php.net/note/delete/78028/useless
Del: bad code    -- htt
ps://master.php.net/note/delete/78028/bad+code
Del: spam        -- https:/
/master.php.net/note/delete/78028/spam
Del: non-english -- 
https://master.php.net/note/delete/78028/non-english
Del: in docs     -- http
s://master.php.net/note/delete/78028/in+docs
Del: other reasons-- https://mast
er.php.net/note/delete/78028
Reject      -- https://mast
er.php.net/note/reject/78028
Search      -- https://
master.php.net/manage/user-notes.php

-- 
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )