Reply to Re: jump php code

Your name:

Reply:


Posted by macca on 09/23/07 08:41

Depends where you are getting our 'activator':

If it's an action based on a submitted for variable you may do
something like this

<?php

if (isset($_POST['form_variable'])){

// more code

}

?>

This snippet will run only if the 'form_variable' input is submitted
as a HTTP post var.
------------------------------------------

OR if you wanted to display someones name if their name is "Ted"

<?php

$name = "Ted";

if ($name == "Ted"){

// do this

}

?>

This snippet will only run if $name is "Ted", otherwise does nothing.
-------------------------------------------

OR using a Boolean

<?php

$boolean_var = FALSE;

if ($boolean_var){

// do this

}

?>

This snippet will not run because $boolean_var is false. If it was
true it would.
--------------------------------------------

In the last example it is not necesarry to write if ($boolean_var ==
TRUE).

All these examples will only do something if the condition equates to
true, otherwise will do nothing.


Hope this helps,

Regards,

Paul.

[Back to original 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

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