[PHP] Re: doubt regarding link

2006-02-25 Thread El Bekko

suresh kumar wrote:

i am having  back to home link ,by default its status is 0 in "mail table " 
database  .when any user click the  back to home link.i want to change status =1 in user 
table.is there any possible to call php function in javascript.i am using javascript 
onclick function.but javascript is not support to access DB.i am calling php function 
from javascript.but its not working.i am waiting for ur response.
   



-
 Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time.
Try using the link type yourpage.php?status=1 and on your home page put 
this check in:


if(isset($_GET['status']))
{
if(intval($_GET['status']) == 1)
{
// Your Query
}
}


Should do it =)

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



[PHP] Re: Make all emails links

2006-03-08 Thread El Bekko

Benjamin Adams wrote:

I'm pulling data from a database;
When the data is pulled emails look like
[EMAIL PROTECTED]

Is there a way to just make all email address in the text that it pulls so,
"bla bla bla okjsokdf [EMAIL PROTECTED] ksnow noduowe..."

Make the email in the text be a mailto link automatically?

Thanks
-Ben


With a RegExp ;)

Something like this (yes my RegExp is bad):

$message = preg_replace("[EMAIL PROTECTED]","href=\"mailto:$1\";>$1",$message);


?>

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



[PHP] Re: php-cgi limitations

2006-03-09 Thread El Bekko

Max Schwanekamp wrote:
Can anyone offer or point me to a summary of differences between running 
php as an Apache module vs as a cgi executable?  Specifically, I'm 
wanting to upgrade our servers to php 5 but there is one crucial 
third-party app we're using that still needs php 4, so I'm hoping I can 
run just that app under php 4 cgi until the vendor updates to support 
php 5.  Google is unusually laconic on this, but perhaps I just offended 
it with too many daft queries on the subject... :)



Are you sure that app won't work under PHP5?

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



[PHP] Re: make global variables accessible to functions?

2006-04-07 Thread El Bekko

Bing Du wrote:

Hello,

We use PHP 4.3.9. 'register_globals = Off' is set in php.ini.  I've heard
using 'global' could cause security problems.  Is using $GLOBALS still not
more secure than using the 'global' keyword? How should function foo()
obtain the value of $a?



===

Thanks in advance,

Bing

That way is secure and has nothing to do with register_globals ;)

What you can do too is this:



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