Re: [PHP] Question about the exit() command

2002-12-19 Thread Mike Joseph
No, for that use a if statement

if($fname == "Select") {
	$errormessage = $error;
	include( "other.html" );
	exit;
} else {
	//code
}

A switch works like this

switch($var) {
	case 1:
		//if $var==1
		$thisvar = $something;
		break;
	case 2:
		//if $var==2
		$thisvar = $something2;
		break;
}

~Mike

On Thursday, December 19, 2002, at 05:34 PM, Beauford.2002 wrote:


Just to make sure I have this right. I have a switch() statement like 
below.
If the case statement is true it should include the page indicated and 
exit
the PHP script without displaying the echo or executing any other 
code. If
the case is false the script should continue as normal.

TIA.

switch (true) {

case ($fname == "Select"):
$errormessage = $error;
include ("other.html");
exit;
}

echo "Other Code";

- Original Message -
From: "Philip Olson" <[EMAIL PROTECTED]>
To: "Beauford.2002" <[EMAIL PROTECTED]>
Cc: "PHP General" <[EMAIL PROTECTED]>
Sent: Thursday, December 19, 2002 4:55 PM
Subject: Re: [PHP] Question about the exit() command



How about:

  if (!$conn = mysql_connect($host, $user, $pass)) {
  include 'static_html.inc';
  exit;
  }

  print "Welcome, yes the database is connected";

exit ends the script, nothing after its use is executed.


Regards,
Philip Olson


On Thu, 19 Dec 2002, Beauford.2002 wrote:


Hi,

Could someone clarify this for me. I want to be able to exit out of a

PHP

webpage and return to the calling page if certain conditions are not

met. It

appears using exit() will do this, but I am unclear exactly how to 
use
it.


any info is appreciated.

TIA




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




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






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




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




[PHP] PHP and secure transactions

2003-07-17 Thread Mike Joseph
Hey everyone,

Anyone have any tips on books, sites, news groups... anything where I 
can get some *good* information on using PHP to process secure 
transactions (the real ones, with an RSA Certificate).

Thanks in advance,
~Mike
--
-==-
Mike Joseph
Unix Geek / Code Monkey
"Gripped by fear men go to the sacred mountains, scared groves, 
sacred trees and shrines."
- the Buddha, (Dp 188)
-==-

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


Re: [PHP] PHP and secure transactions

2003-07-17 Thread Mike Joseph
Not exactly sure  what you mean.. do you want a php script to make a
secure connection with some external website?
Perhaps... we are just in the planning stages right now.

I have books upon books on writing code for secure transactions 
(processing credit card numbers, mostly) in Java and C++, but I have 
yet to find anything equivalent  for PHP

We have a server: apache, mod_ssl, php with mcrypt, and an RSA Cert, 
I understand these technologies, I'm looking for general information, 
tips, advice on working with them together.

~Mike

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