Re: [PHP] confirm box

2002-10-09 Thread Holger Heinze, Portalmeister GmbH

hi there
youre missing a return.

here is the code i use in order to supress the submission of the form in
case the field validation (or the are you sure... ? confirm()) returns
false:

 form onSubmit=return validateForm(this)

Have fun,

Holger
- Original Message -
From: Davy Obdam [EMAIL PROTECTED]
To: PHP Mailinglist [EMAIL PROTECTED]; PHP-WIN Mailinglist
[EMAIL PROTECTED]
Sent: Wednesday, October 09, 2002 4:17 PM
Subject: [PHP] confirm box


 Hi people,

 Maybe a bit off-topic, but i thought lets ask anyway. I have a guestbook
 admin page were i can delete multiple items from the database using
 checkboxes. So when i click on the Submit button i would like a
 javascript confirm box coming up. I have done that, but it deletes the
 item(s) anyway, also if i click on cancel.

 This is my javascript code in the head of the document:

 script language=JavaScript type=text/javascript
 !--
 function ConfirmDelete()
 {
 input_box=confirm(Are you sure that you want to delete the
 selected items?);
 if (input_box!=true)
 {
 return false;
 }
 else
 {
 return true;
 }
 }
 //--
 /script

 This is what i use in my PHP code:

 ?php
 //Guestbook admin page
 echo 
 form name=\admin\ onSubmit=\ConfirmDelete();\;
 //The rest of my form
 echo 
 input type=\submit\ name=\submit\ value=\delete\
 /form;
 ?

 ?php
 //Delete items from guestbook
 if(isSet($submit))
 {
 //Delete items
 }
 ?

 Any help is appreciated, thanks for your time,

 Best regards,

 Davy Obdam,
 mailto:[EMAIL PROTECTED]



 --
 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




Re: [PHP] Error disabling

2002-10-04 Thread Holger Heinze, Portalmeister GmbH

Hi there,

i use this line in my code.

#error_reporting(E_ALL);  // set to -- (E_ERROR) (E_WARNING) (E_PARSE)
(E_NOTICE) (E_CORE_ERROR) (E_CORE_WARNING) (E_ALL)

check out the docs:
http://www.php.net/manual/en/function.error-reporting.php

holger
- Original Message -
From: Davíð Örn Jóhannsson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, October 04, 2002 12:51 PM
Subject: [PHP] Error disabling


I need to be able to disable error reporting on one page with php, I
just don't remember how to do this, if I remember correctly I could call
some function in the begining of a php doc and tell it not to disply any
errors that occur while parsing the doc.




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




[PHP] Fw: Speed of the PHP Parser MySQL vs. textfiles

2002-09-25 Thread Holger Heinze, Portalmeister GmbH


Hi people, maybe someone here has experience with this question:

We have to create a CMS System for beginners. For storing data, we have 3
possibilities:


1. Store Data in MySQL, query the database, inlcude the dynamic content via
php.

echo $mysqldata[headline].P\n;

2. Store Data in Textfiles holding the Data like this:

?
$userpreferences[headline] = My Headline;
$userpreferences[bgcolor] = #00FF00;
// etc.
?

This would mean, we just include the preferences file at the top of the php
script generating the output page. (A lot less coding i think)

3. Generate HTML pages (soc. cache) everytime the user makes changes to his
pages.


I just had an argument with a co-worker and I would like to have your guys'
opinion on this:

Combination 1: Store frequently changed info in 1. MySQL Database and rarely
changed data in 2. Textfiles that are included.

Combination 2: Store frequently changed info in 1. MySQL Database and rarely
changed data in 3. Plain HTML Cache files.

I won't say which one is mine! ;-)

So, which one would you guys prefer, and what do you think is faster ...
Included Textfiles or HTML or MySQL ?

We also of course have to take the time and complexity of the coding into
consideration.

Thanks a lot for any answer!

(Also thankful for urls to php parser benchmarks etc...)

Holger Heinze


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




Re: [PHP] Fw: Speed of the PHP Parser MySQL vs. textfiles

2002-09-25 Thread Holger Heinze, Portalmeister GmbH

Hi,

apologies for the confirmation, didn't even know it was set on this Computer
(not my own) until I got it myself.

I hate it =)

Sorry again,
Holger



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