|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: php-general-digest-help
lists.php.netDate: Sat Mar 17 2001 - 08:29:15 CST
php-general Digest 17 Mar 2001 14:29:15 -0000 Issue 572
Topics (messages 44352 through 44388):
Re: Associative vs normal arrays
44352 by: Alexander Wagner
44380 by: Yev
Zend?
44353 by: Chris Anderson
44379 by: Alexander Wagner
PSpell?
44354 by: Jonathan Sharp
header:(location) error
44355 by: stas
44358 by: Brett
Running script on remote server
44356 by: Patrick Dunford
Re: Putting php at end of html?
44357 by: Richard Lynch
metabase docs and DB abstraction
44359 by: Dean Hall
Re: mail() implementation problem
44360 by: Tim Frank
Re: XML Newbie.!
44361 by: Nik Gare
44362 by: Rick St Jean
44366 by: Nik Gare
44369 by: Rick St Jean
Re: articles to install Red Hat server, mysql, php
44363 by: Nyon
Invalid or Valid because the same.
44364 by: techzeus.pacific.net.sg
44365 by: techzeus.pacific.net.sg
44368 by: techzeus.pacific.net.sg
44370 by: Jason Lotito
44371 by: Jack Dempsey
44372 by: Jason Lotito
44373 by: techzeus.pacific.net.sg
Require vs include
44367 by: NGUYEN DINH Quoc Huy
44378 by: Boaz Yahav
Repost URGENT: Can't see picture!!!!!!!!
44374 by: Mike Yuen
Variables problem
44375 by: Per Kallin
Classes and Object Oriented Programming
44376 by: techzeus.pacific.net.sg
Re: Login System with access levels
44377 by: Jordan Elver
Re: Webmin
44381 by: mwaples.waples.net
Undefined Variable
44382 by: Jorge Alvarez
Headers
44383 by: Clayton Dukes
44384 by: Gianluca Baldo
44385 by: Clayton Dukes
44386 by: Brett
How no-cache some object?
44387 by: Mig
44388 by: Brett
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
eschmid+sic
s.netic.de wrote:
> > There are only assotiative arrays in PHP.
>
> PHP has associative and numeric (normal) arrays. But is_array() says
> only if it is an array or not. The distinction could only be made if
> you look at keys. Keys can be integers or strings. I hope this was
> correct, if not, Andrei can correct me :)
If I'm not completely mistaken, PHP has only associative arrays,
which can act more or less like "normal" indexed arrays when numbers
are used as keys, which is the default when no keys are set explicitly,
like in:
$arr = array('a', 'b', 'c');
which equals
$arr = array(0 => 'a', 1 => 'b', 2 => 'c');
But they are still associative, afaik.
However, I agree, the only way to make a distinction is to look if the
keys are integers.
regards
Wagner
-- Assumption is the mother of all fuck-ups.
attached mail follows:
what do you mean? all arrays are associative. even the simple $arr = array(1,2,3,4,5); has key/value pairs associated with it.. similar to doing: $arr = array(0=>1,1=>2,2=>3,3=>4,4=>5);
--- Joe <joe
mail.nitewaryr.com> wrote:
> Is there a way to determine if an array is associative or not? Maybe
> something similar to the is_array() function ??
>
> Thanks,
>
> JOE
>
__________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
attached mail follows:
I've heard alot about the Zend Encoder. Using it can I encode I file so that php still executes it, but a person cannot read my source by looking at the file? I'm programming components for people and would prefer if they could use it, but not see my source. Does it require any extra server settings etc?
attached mail follows:
Chris Anderson wrote: > I've heard alot about the Zend Encoder. [..] > Does it require > any extra server settings etc?
It requires the Zend Optimizer to be installed.
regards Wagner
-- Assumption is the mother of all fuck-ups.
attached mail follows:
I have checked my phpinfo() and it shows that PSPell is enabled.
But when i run the following script (per php.net/manual/ example) i get the following (following) error...
$pspell_link = pspell_new ("en");
if (pspell_check ($pspell_link, "testt")) { echo "This is a valid spelling"; } else { echo "Sorry, wrong spelling"; }
"Warning: PSPELL couldn't open the dictionary. reason: I'm sorry I can't find any sutable word lists for the language-tag "en". in /parte/htdocs/public_html/pspell/test1.php on line 10
Warning: 0 is not an PSPELL result index in /parte/htdocs/public_html/pspell/test1.php on line 12 Sorry, wrong spelling "
I have pspell-.11.2
Thanks, -Jonathan
attached mail follows:
Hello,
I am receiving the following error from my app, and I'd be gratefull if somebody would point out the usual cause of it. I am doing a redirect based on a form validation routine. Thank you.
Warning: Cannot add header information - headers already sent in /usr/home/stas/html/cathedral/scripts/act_save_resume.php on line 175
attached mail follows:
> I am receiving the following error from my app, and I'd be gratefull if > somebody would point out the usual cause of it. I am doing a redirect > based on a form validation routine. Thank you. > > Warning: Cannot add header information - headers already sent in > /usr/home/stas/html/cathedral/scripts/act_save_resume.php on line 175
Make sure you have no whitespace above your <? ?> tags. If any output is sent to the browser then you can not add a header, session, cookie.
Brett
attached mail follows:
The PHP 4.0 manual contains this information: --------------------------------------------- Chapter 20. Using remote files As long as support for the "URL fopen wrapper" is enabled when you configure PHP (which it is unless you explicitly pass the --disable-url-fopen-wrapper flag to configure (for versions up to 4.0.3) or set allow_url_fopen to off in php.ini (for newer versions), you can use HTTP and FTP URLs with most functions that take a filename as a parameter, including the require() and include() statements.
Note: You can't use remote files in include() and require() statements on Windows.
For example, you can use this to open a file on a remote web server, parse the output for the data you want, and then use that data in a database query, or simply to output it in a style matching the rest of your website. ---------------------------------------------
The example in the Help shows opening a file at http://www.php.net/ with fopen(). Are they accessing the source code of the script, or the HTML code that is output by the PHP server when it runs the PHP script that it loads from that location?
What I want to be able to do is, to get around the problem that the server that I am running my site on does not have database, I want to run the database on another server elsewhere on the Web. I want to be able to, by fopen() -ing the page via its URL, to be passing some variables to the script, have the remote PHP server run the script and pass back to me the output as a file, which I can then load into my web page and display.
======================================================================= Patrick Dunford, Christchurch, NZ - http://pdunford.godzone.net.nz/
You are all sons of God through faith in Christ Jesus, for all of you who were baptized into Christ have clothed yourselves with Christ. -- Galatians 3:26-27 http://www.heartlight.org/cgi-shl/todaysverse.cgi?day=20010316 ======================================================================= Created by Mail2Sig - http://pdunford.godzone.net.nz/software/mail2sig/
attached mail follows:
> > YES! > > The only "problem" will be that these .php pages will be > > maybe 5% slower since PHP is "parsing" them. > > That and all the links pointing to the old .html files will be > broken...
That's what using .php in advance will avoid.
> So if you mix PHP and HTML in a file, PHP will be slower > to parse those files? I thought it was smart enough to > parse only what was within the recognized start and end > tags (<? ?>, <?php ?>, <script language="php"></script>, > etc)?
PHP *is* smart enough, but it has to "look" in the HTML to see any <?php (et al) tags.
So, a "raw" HTML file not passing through PHP is a little faster than a PHP file that only has HTML in it.
I actually pass all my .htm and .html files through PHP anyway. Cuz my musician clients can't handle remembering that URLs end in .php, and they were surfing direct to .htm and complaining the pages were missing...
-- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
Anyone have opinions on which DB abstraction layer is best for what situation? Is there an article somewhere that compares the various DB abstraction layers?
(Cross-post:)
Anyone know where I can find documentation or samples for metabase?
Dean.
attached mail follows:
Mathieu,
I believe the feature you are looking for has been made available in the new PHP 4.0.5 that is upcoming. They have added a 5th paramether to the mail() function so you can actually pass sendmail command line arguments such as -f. For those of us not running the development version, someone was kind enough to post a really good work around that isn't hard and gives the same functionality. I won't post it here, but it can be found as the last of the user comments at http://www.php.net/manual/en/function.mail.php dated March 9th at 5:02 am. I implemented this on my servers and it works great. You do have to add the one line to the scripts that use the mail function, but that is really it after sendmail is configured. Hope that was what you were looking for.
Tim Frank
>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<
On 16/03/01, 5:05:13 AM, arn_mat
club-internet.fr (Mathieu Arnold) wrote
regarding Re: [PHP] mail() implementation problem:
> Manuel Lemos wrote: > > > > Hello, > > > > Mathieu Arnold wrote: > > > > > > Hi > > > > > > The actual implementation of the mail fonction use sendmail -t and > > > relies on sendmail to parse the headers to get the recipients. > > > It would be great if it was possible to switch from this way of using > > > sendmail to a more classic > > > sendmail -f sender rcpt > > > it should be quite easy, but I lack time to do it. > > > > You may want to try this PHP MIME message composing and sending class > > that has subclasses for sending messages using directly sendmail, qmail > > or even a SMTP server. > > > > http://phpclasses.UpperDesign.com/browse.html/package/9
> looks nice, but I'm not going to ask all my clients to change their php > scripts ;) > I just need to change the way php calls sendmail :) > I believe I'm going to do it myself next week or so.
> -- > Mathieu Arnold
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
In article <PDEPKLDIPCODFDGNLKBBGEJLCHAA.dful
metahogar.com>, Diego
Fulgueira <dful
metahogar.com> wrote:
> Hi! Ok, this is not a question about PHP, but since this is such a
> great discussion forum, I am certain it is a good place to get started
> with a new technology.
<snip>
Oh, but it is a PHP mail list/newsgroup. This question does not belong here.
Nik
attached mail follows:
Make sure you read the whole message before you comment. There was a relative question at the bottom.
Rick
At 12:59 AM 3/17/01 +0100, Nik Gare wrote:
>In article <PDEPKLDIPCODFDGNLKBBGEJLCHAA.dful
metahogar.com>, Diego
>Fulgueira <dful
metahogar.com> wrote:
> > Hi! Ok, this is not a question about PHP, but since this is such a
> > great discussion forum, I am certain it is a good place to get started
> > with a new technology.
><snip>
>
>Oh, but it is a PHP mail list/newsgroup.
>This question does not belong here.
>
>Nik
>
##########################################################
# Rick St Jean,
# rstjean
internet.look.ca
# President of Design Shark,
# http://www.designshark.com/
# Quick Contact: http://www.designshark.com/messaging.ihtml
# Tel: 905-684-2952
##########################################################
attached mail follows:
In article <4.3.2.7.0.20010317013534.00e24dd0
mail.internet.look.ca>,
Rick St Jean <rstjean
internet.look.ca> wrote:
> Make sure you read the whole message before you comment. There was a
> relative question at the bottom.
I have a question concerning <table> tags. I also have a question concerning PHP. Should I ask both questions here, or just the PHP related question?
Nik
btw, the references, ie who you are replying to, in your mail is incorrect.
attached mail follows:
If it was a question about tables and how you can use them with PHP then yes. Take this off-list if you have something important to say please.
At 07:39 AM 3/17/01 +0100, Nik Gare wrote:
>In article <4.3.2.7.0.20010317013534.00e24dd0
mail.internet.look.ca>,
> Rick St Jean <rstjean
internet.look.ca> wrote:
> > Make sure you read the whole message before you comment. There was a
> > relative question at the bottom.
>
>I have a question concerning <table> tags.
>I also have a question concerning PHP.
>Should I ask both questions here, or just the PHP related question?
>
>Nik
>
>btw, the references, ie who you are replying to, in your mail is
>incorrect.
>
##########################################################
# Rick St Jean,
# rstjean
internet.look.ca
# President of Design Shark,
# http://www.designshark.com/
# Quick Contact: http://www.designshark.com/messaging.ihtml
# Tel: 905-684-2952
##########################################################
attached mail follows:
Hi,
I found a lot of articles that teaches how to install Red Hat Linux, MySQL and PHP. However, most of them are not elaborate enough to go through the entire process. Anyone with some solid resources on these ?
Also, can one install the server version of Red Hat with a GUI interface rather the plain command line ?
Nyon
attached mail follows:
Hello,
Sorry to disturb you guys of your precious programing time ;-)
I'm stumped, I have coded everything properly and everything looks perfectly fine but I'm still getting error. I'm doing a lostpassword script such that when a user fills in their email, the database will check if there is such an email and then send the username\password according to the email.
But when I type in a valid or an invalid email at the first time, a error\valid message will appear as normally but then, after that, what ever email I typed in (whether valid or invalid) will not show any error anymore and just clears up.
I have attached a php file together with this email.
I apologize if you are having to download an extra 2k with this message.
Please help me out. Thank you.
------------------------------------ David Chua -------------------------------------
attached mail follows:
Sorry, heres the attached file.
----- Original Message -----
From: techzeus
pacific.net.sg
To: 'PHP General List. (E-mail)'
Sent: Saturday, March 17, 2001 2:35 PM
Subject: Invalid or Valid because the same.
Hello,
Sorry to disturb you guys of your precious programing time ;-)
I'm stumped, I have coded everything properly and everything looks perfectly fine but I'm still getting error. I'm doing a lostpassword script such that when a user fills in their email, the database will check if there is such an email and then send the username\password according to the email.
But when I type in a valid or an invalid email at the first time, a error\valid message will appear as normally but then, after that, what ever email I typed in (whether valid or invalid) will not show any error anymore and just clears up.
I have attached a php file together with this email.
I apologize if you are having to download an extra 2k with this message.
Please help me out. Thank you.
------------------------------------ David Chua -------------------------------------
attached mail follows:
//HTML headers here
<? if ($Submit == "Submit") { // If form has been submitted $errormsg = array();
if (!$email) { $errormsg[] = "Please fill in your email address"; }
$count = count($errormsg);
#echo $count."<br>";
if ($count > 0) { for ($i=0; $i<count($errormsg); $i++) { echo $errormsg[$i]."<br>";
}
}
elseif ($count == 0) { #Insert Database checking ( NO ERROR )
$host="localhost"; $dbuser="root"; $dbpassword="root";
mysql_connect($host, $dbuser, $dbpassword) or die ("Unable to Connect to Database"); mysql_select_db("secretDB"); $query = "Select username,password from users where email = '$email'"; $sqlquery = mysql_query($query); $num = mysql_numrows($sqlquery);
if ($num == 0) #Not valid { ?> <center>So sorry, your email is not valid.</body></html> <?
} else if ($num == 1) #Valid { ?> <center>Sent mail.</body></html>
<?
}
}
} if ($reset == "Reset"){ $username = ""; $real_name = ""; $password = ""; $email = ""; }
?>
// Form here
----- Original Message -----
From: "Jason Lotito" <Jason
lehighweb.com>
To: <techzeus
pacific.net.sg>
Sent: Saturday, March 17, 2001 5:59 PM
Subject: RE: [PHP] Re: Invalid or Valid because the same.
> I have attached a php file together with this email.
>
> I apologize if you are having to download an extra 2k with this message.
>
> Please help me out. Thank you.
>
> -----Original Message-----
> From: techzeus
pacific.net.sg [mailto:techzeus
pacific.net.sg]
> Sent: Friday, March 16, 2001 10:36 PM
> To: techzeus
pacific.net.sg; 'PHP General List. (E-mail)'
> Subject: [PHP] Re: Invalid or Valid because the same.
>
>
> Sorry, heres the attached file.
>
>
> Nope, still no file. You might want to just paste the important stuff
into
> the email to the group.
>
> Jason Lotito
> jason
lehighweb.com
> www.newbienetwork.net
>
attached mail follows:
Look in the script...
> -----Original Message-----
> From: techzeus
pacific.net.sg [mailto:techzeus
pacific.net.sg]
> Sent: Friday, March 16, 2001 10:50 PM
> To: 'PHP General List. (E-mail)'
> Subject: Re: [PHP] Re: Invalid or Valid because the same.
>
>
> //HTML headers here
>
> <?
> if ($Submit == "Submit") { // If form has been submitted
> $errormsg = array();
>
>
> if (!$email)
> {
> $errormsg[] = "Please fill in your email address";
> }
>
>
> $count = count($errormsg);
>
> #echo $count."<br>";
>
> if ($count > 0) {
> for ($i=0; $i<count($errormsg); $i++) {
> echo $errormsg[$i]."<br>";
>
> }
>
> }
>
> elseif ($count == 0)
> {
> #Insert Database checking ( NO ERROR )
>
> $host="localhost";
> $dbuser="root";
> $dbpassword="root";
>
> mysql_connect($host, $dbuser, $dbpassword)
> or die ("Unable to Connect to Database");
> mysql_select_db("secretDB");
> $query = "Select username,password from
> users where email = '$email'";
> $sqlquery = mysql_query($query);
Now, maybe this is just me, but...I would take a strong look at your mysql_numrows() function...their is an msql_numrows, but unless I am off my rocker...there is no mysql_numrows function. That might be part of the problem...
> $num = mysql_numrows($sqlquery);
>
> if ($num == 0) #Not valid
> {
> ?>
> <center>So sorry, your
> email is not
> valid.</body></html>
> <?
>
>
> }
> else if ($num == 1) #Valid
> {
> ?>
> <center>Sent mail.</body></html>
>
>
> <?
>
> }
>
> }
>
> }
> if ($reset == "Reset"){
> $username = "";
> $real_name = "";
> $password = "";
> $email = "";
> }
>
>
> ?>
>
> // Form here
>
>
> ----- Original Message -----
> From: "Jason Lotito" <Jason
lehighweb.com>
> To: <techzeus
pacific.net.sg>
> Sent: Saturday, March 17, 2001 5:59 PM
> Subject: RE: [PHP] Re: Invalid or Valid because the same.
>
>
> > I have attached a php file together with this email.
> >
> > I apologize if you are having to download an extra 2k with this message.
> >
> > Please help me out. Thank you.
> >
> > -----Original Message-----
> > From: techzeus
pacific.net.sg [mailto:techzeus
pacific.net.sg]
> > Sent: Friday, March 16, 2001 10:36 PM
> > To: techzeus
pacific.net.sg; 'PHP General List. (E-mail)'
> > Subject: [PHP] Re: Invalid or Valid because the same.
> >
> >
> > Sorry, heres the attached file.
> >
> >
> > Nope, still no file. You might want to just paste the important stuff
> into
> > the email to the group.
> >
> > Jason Lotito
> > jason
lehighweb.com
> > www.newbienetwork.net
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
http://www.php.net/manual/en/function.mysql-num-rows.php
jack
Jason Lotito wrote:
>
> Look in the script...
>
> > -----Original Message-----
> > From: techzeus
pacific.net.sg [mailto:techzeus
pacific.net.sg]
> > Sent: Friday, March 16, 2001 10:50 PM
> > To: 'PHP General List. (E-mail)'
> > Subject: Re: [PHP] Re: Invalid or Valid because the same.
> >
> >
> > //HTML headers here
> >
> > <?
> > if ($Submit == "Submit") { // If form has been submitted
> > $errormsg = array();
> >
> >
> > if (!$email)
> > {
> > $errormsg[] = "Please fill in your email address";
> >
}
> >
> >
> > $count = count($errormsg);
> >
> > #echo $count."<br>";
> >
> > if ($count > 0) {
> > for ($i=0; $i<count($errormsg); $i++) {
> > echo $errormsg[$i]."<br>";
> >
> > }
> >
> > }
> >
> > elseif ($count == 0)
> > {
> > #Insert Database checking ( NO ERROR )
> >
> > $host="localhost";
> > $dbuser="root";
> > $dbpassword="root";
> >
> > mysql_connect($host, $dbuser, $dbpassword)
> > or die ("Unable to Connect to Database");
> > mysql_select_db("secretDB");
> > $query = "Select username,password from
> > users where email = '$email'";
> > $sqlquery = mysql_query($query);
>
> Now, maybe this is just me, but...I would take a strong look at your
> mysql_numrows() function...their is an msql_numrows, but unless I am off my
> rocker...there is no mysql_numrows function. That might be part of the
> problem...
>
> > $num = mysql_numrows($sqlquery);
> >
> > if ($num == 0) #Not valid
> > {
> > ?>
> > <center>So sorry, your
> > email is not
> > valid.</body></html>
> > <?
> >
> >
> > }
> > else if ($num == 1) #Valid
> > {
> > ?>
> > <center>Sent mail.</body></html>
> >
> >
> > <?
> >
> > }
> >
> > }
> >
> > }
> > if ($reset == "Reset"){
> > $username = "";
> > $real_name = "";
> > $password = "";
> > $email = "";
> > }
> >
> >
> > ?>
> >
> > // Form here
> >
> >
> > ----- Original Message -----
> > From: "Jason Lotito" <Jason
lehighweb.com>
> > To: <techzeus
pacific.net.sg>
> > Sent: Saturday, March 17, 2001 5:59 PM
> > Subject: RE: [PHP] Re: Invalid or Valid because the same.
> >
> >
> > > I have attached a php file together with this email.
> > >
> > > I apologize if you are having to download an extra 2k with this message.
> > >
> > > Please help me out. Thank you.
> > >
> > > -----Original Message-----
> > > From: techzeus
pacific.net.sg [mailto:techzeus
pacific.net.sg]
> > > Sent: Friday, March 16, 2001 10:36 PM
> > > To: techzeus
pacific.net.sg; 'PHP General List. (E-mail)'
> > > Subject: [PHP] Re: Invalid or Valid because the same.
> > >
> > >
> > > Sorry, heres the attached file.
> > >
> > >
> > > Nope, still no file. You might want to just paste the important stuff
> > into
> > > the email to the group.
> > >
> > > Jason Lotito
> > > jason
lehighweb.com
> > > www.newbienetwork.net
> > >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Yeah..I saw that last line AFTER having posted that. =) Goes to show myself that even when you search for a function, and the manual says it doesn't exist...it still might. Haha...
> -----Original Message-----
> From: jack
georgetown.edu [mailto:jack
georgetown.edu]On Behalf Of Jack
> Dempsey
> Sent: Friday, March 16, 2001 11:09 PM
> To: Jason Lotito
> Cc: techzeus
pacific.net.sg; 'PHP General List. (E-mail)'
> Subject: Re: [PHP] Re: Invalid or Valid because the same.
>
>
> http://www.php.net/manual/en/function.mysql-num-rows.php
>
> jack
>
> Jason Lotito wrote:
> >
> > Look in the script...
> >
> > > -----Original Message-----
> > > From: techzeus
pacific.net.sg [mailto:techzeus
pacific.net.sg]
> > > Sent: Friday, March 16, 2001 10:50 PM
> > > To: 'PHP General List. (E-mail)'
> > > Subject: Re: [PHP] Re: Invalid or Valid because the same.
> > >
> > >
> > > //HTML headers here
> > >
> > > <?
> > > if ($Submit == "Submit") { // If form has been submitted
> > > $errormsg = array();
> > >
> > >
> > > if (!$email)
> > > {
> > > $errormsg[] = "Please fill in your email address";
> > >
>
> }
> > >
> > >
> > > $count = count($errormsg);
> > >
> > > #echo $count."<br>";
> > >
> > > if ($count > 0) {
> > > for ($i=0; $i<count($errormsg); $i++) {
> > > echo $errormsg[$i]."<br>";
> > >
> > > }
> > >
> > > }
> > >
> > > elseif ($count == 0)
> > > {
> > > #Insert Database checking ( NO ERROR )
> > >
> > > $host="localhost";
> > > $dbuser="root";
> > > $dbpassword="root";
> > >
> > > mysql_connect($host, $dbuser,
> $dbpassword)
> > > or die ("Unable to Connect to Database");
> > > mysql_select_db("secretDB");
> > > $query = "Select
> username,password from
> > > users where email = '$email'";
> > > $sqlquery = mysql_query($query);
> >
> > Now, maybe this is just me, but...I would take a strong look at your
> > mysql_numrows() function...their is an msql_numrows, but unless
> I am off my
> > rocker...there is no mysql_numrows function. That might be part of the
> > problem...
> >
> > > $num = mysql_numrows($sqlquery);
> > >
> > > if ($num == 0) #Not valid
> > > {
> > > ?>
> > > <center>So sorry, your
> > > email is not
> > > valid.</body></html>
> > > <?
> > >
> > >
> > > }
> > > else if ($num == 1) #Valid
> > > {
> > > ?>
> > > <center>Sent mail.</body></html>
> > >
> > >
> > > <?
> > >
> > > }
> > >
> > > }
> > >
> > > }
> > > if ($reset == "Reset"){
> > > $username = "";
> > > $real_name = "";
> > > $password = "";
> > > $email = "";
> > > }
> > >
> > >
> > > ?>
> > >
> > > // Form here
> > >
> > >
> > > ----- Original Message -----
> > > From: "Jason Lotito" <Jason
lehighweb.com>
> > > To: <techzeus
pacific.net.sg>
> > > Sent: Saturday, March 17, 2001 5:59 PM
> > > Subject: RE: [PHP] Re: Invalid or Valid because the same.
> > >
> > >
> > > > I have attached a php file together with this email.
> > > >
> > > > I apologize if you are having to download an extra 2k with
> this message.
> > > >
> > > > Please help me out. Thank you.
> > > >
> > > > -----Original Message-----
> > > > From: techzeus
pacific.net.sg [mailto:techzeus
pacific.net.sg]
> > > > Sent: Friday, March 16, 2001 10:36 PM
> > > > To: techzeus
pacific.net.sg; 'PHP General List. (E-mail)'
> > > > Subject: [PHP] Re: Invalid or Valid because the same.
> > > >
> > > >
> > > > Sorry, heres the attached file.
> > > >
> > > >
> > > > Nope, still no file. You might want to just paste the
> important stuff
> > > into
> > > > the email to the group.
> > > >
> > > > Jason Lotito
> > > > jason
lehighweb.com
> > > > www.newbienetwork.net
> > > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > > For additional commands, e-mail: php-general-help
lists.php.net
> > > To contact the list administrators, e-mail:
> php-list-admin
lists.php.net
> > >
> > >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
Now that, the function has been verified,
what else could be wrong?
----- Original Message -----
From: "Jack Dempsey" <dempsejn
georgetown.edu>
To: "Jason Lotito" <Jason
LehighWeb.com>
Cc: <techzeus
pacific.net.sg>; "'PHP General List. (E-mail)'"
<php-general
lists.php.net>
Sent: Saturday, March 17, 2001 3:08 PM
Subject: Re: [PHP] Re: Invalid or Valid because the same.
> http://www.php.net/manual/en/function.mysql-num-rows.php
>
> jack
>
> Jason Lotito wrote:
> >
> > Look in the script...
> >
> > > -----Original Message-----
> > > From: techzeus
pacific.net.sg [mailto:techzeus
pacific.net.sg]
> > > Sent: Friday, March 16, 2001 10:50 PM
> > > To: 'PHP General List. (E-mail)'
> > > Subject: Re: [PHP] Re: Invalid or Valid because the same.
> > >
> > >
> > > //HTML headers here
> > >
> > > <?
> > > if ($Submit == "Submit") { // If form has been submitted
> > > $errormsg = array();
> > >
> > >
> > > if (!$email)
> > > {
> > > $errormsg[] = "Please fill in your email address";
> > >
>
> }
> > >
> > >
> > > $count = count($errormsg);
> > >
> > > #echo $count."<br>";
> > >
> > > if ($count > 0) {
> > > for ($i=0; $i<count($errormsg); $i++) {
> > > echo $errormsg[$i]."<br>";
> > >
> > > }
> > >
> > > }
> > >
> > > elseif ($count == 0)
> > > {
> > > #Insert Database checking ( NO ERROR )
> > >
> > > $host="localhost";
> > > $dbuser="root";
> > > $dbpassword="root";
> > >
> > > mysql_connect($host, $dbuser,
$dbpassword)
> > > or die ("Unable to Connect to Database");
> > > mysql_select_db("secretDB");
> > > $query = "Select username,password
from
> > > users where email = '$email'";
> > > $sqlquery = mysql_query($query);
> >
> > Now, maybe this is just me, but...I would take a strong look at your
> > mysql_numrows() function...their is an msql_numrows, but unless I am off
my
> > rocker...there is no mysql_numrows function. That might be part of the
> > problem...
> >
> > > $num = mysql_numrows($sqlquery);
> > >
> > > if ($num == 0) #Not valid
> > > {
> > > ?>
> > > <center>So sorry, your
> > > email is not
> > > valid.</body></html>
> > > <?
> > >
> > >
> > > }
> > > else if ($num == 1) #Valid
> > > {
> > > ?>
> > > <center>Sent mail.</body></html>
> > >
> > >
> > > <?
> > >
> > > }
> > >
> > > }
> > >
> > > }
> > > if ($reset == "Reset"){
> > > $username = "";
> > > $real_name = "";
> > > $password = "";
> > > $email = "";
> > > }
> > >
> > >
> > > ?>
> > >
> > > // Form here
> > >
> > >
> > > ----- Original Message -----
> > > From: "Jason Lotito" <Jason
lehighweb.com>
> > > To: <techzeus
pacific.net.sg>
> > > Sent: Saturday, March 17, 2001 5:59 PM
> > > Subject: RE: [PHP] Re: Invalid or Valid because the same.
> > >
> > >
> > > > I have attached a php file together with this email.
> > > >
> > > > I apologize if you are having to download an extra 2k with this
message.
> > > >
> > > > Please help me out. Thank you.
> > > >
> > > > -----Original Message-----
> > > > From: techzeus
pacific.net.sg [mailto:techzeus
pacific.net.sg]
> > > > Sent: Friday, March 16, 2001 10:36 PM
> > > > To: techzeus
pacific.net.sg; 'PHP General List. (E-mail)'
> > > > Subject: [PHP] Re: Invalid or Valid because the same.
> > > >
> > > >
> > > > Sorry, heres the attached file.
> > > >
> > > >
> > > > Nope, still no file. You might want to just paste the important
stuff
> > > into
> > > > the email to the group.
> > > >
> > > > Jason Lotito
> > > > jason
lehighweb.com
> > > > www.newbienetwork.net
> > > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > > For additional commands, e-mail: php-general-help
lists.php.net
> > > To contact the list administrators, e-mail:
php-list-admin
lists.php.net
> > >
> > >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Hi
Can someone explain me what's the difference between include() and require() ?? I did not catch the explanation in the docs. When should I use include() and when should I use require() ??
I'm not on the list so reply me to: snakes
fr.st
Thnx
-- ================================================= NGUYEN DINH Quoc Huy (SnAKes) http://www.snakesbox.com/ snakesfr.st - ICQ# 3398187 telnet://snakesbox.com:4444/ <-- Puissance 4 =================================================
attached mail follows:
Hi
Check out :
http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=22
Sincerely
berber
Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow.
-----Original Message-----
From: NGUYEN DINH Quoc Huy [mailto:snakes
fr.st]
Sent: Saturday, March 17, 2001 9:44 AM
To: php-general
lists.php.net
Subject: [PHP] Require vs include
Hi
Can someone explain me what's the difference between include() and require() ?? I did not catch the explanation in the docs. When should I use include() and when should I use require() ??
I'm not on the list so reply me to: snakes
fr.st
Thnx
-- ================================================= NGUYEN DINH Quoc Huy (SnAKes) http://www.snakesbox.com/ snakesfr.st - ICQ# 3398187 telnet://snakesbox.com:4444/ <-- Puissance 4 =================================================
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Hi, this is a repost and nothing i've tried is working. Basically, I allow people to upload pictures and they all go to the proper directories but I can't see the picture. I can see the pictures great on my windows server but no one else can see it. Obviously the path to the images is screwed but I can't figure it out. The $picdir i've tried are: $picdir = "./userpics"; $picdir = "c:/phpweb/userpics/" $picdir = "/userpics"; $picdir = "../userpics"; All of the above don't work. I'll post my code below:
<?PHP session_start(); include("dblib.inc"); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Uploading your potrait</title> <Link href="arial.css" rel=stylesheet title=arial type=text/css>
<body> <img src="pics/logo.gif"> <BR> <H3>Portrait Picture</h3> <?PHP //defines location $filedir = "c:/phpweb/userpics"; $picdir = "./userpics";
//check for jpeg image type
if($fupload_type =="image/pjpeg")
{
//copies picture to new directory and renames to username
if(copy($fupload,"$filedir/$CUserName.jpg"))
{
print ("<B>Hey Goodlooking! Your picture has been uploaded
correctly</b><BR><BR>");
print "<table border=1>
<TR>
<TD height=\"300\" width=\"300\" align=\"center\">";
print ("<img src=\"$picdir/$CUserName.jpg\">");
print"</td>
</tr></table>";
print "<BR><B><a href=\"memberprofile.php?$PHPSESSID\">Home</a></b>";
print " <B><a href=\"fupload.php\">Upload again</a></b><BR>";
//adds 'yes' to database so user can search only profiles with
pictures.
$query="UPDATE clients SET CPicture='yes' WHERE
CUserName='$CUserName'";
//FAILED PROCESS
if(!mysql_query($query))
{
print "A process has failed during the update. Please report this
incident to the Web Master <a
href=\"mailto:mjyuen
hotmail.com\">mjyuen
hotmail.com</a><BR><BR>";
print "<BR><B><a href=\"memberprofile.php?$PHPSESSID\">Home</a></b>";
return false; } return true; } die ("Error in uploading. Please try again");
} else { //PRINTS IF PICTURE IS ANYTHING BUT JPEG FORMAT print "In order to show off your qualities to the fullest extent.<BR> LDSAlberta.com currently only acceptes pictures in JPEG format which have the highest color quality and in turn show you off the best!"; print "<BR><B><a href=\"memberprofile.php?$PHPSESSID\">Home</a></b>"; print " <B><a href=\"fupload.php\">Upload again</a></b><BR>"; } unlink($fupload); mysql_close(); ?> </body> </html>
attached mail follows:
Hi! I have a quite big form to fill out a calendar. The form has six fields for every day in a month to make it possible to set up tree apointments (the target of the meeting and Locataion), this makes a total of about ~180 fields so I created them with a for-loop. Now I got this 180 fields named tar1-1, loc1-1, tar2-1, loc2-1 a.s.o. where the first tree letters tells what information it is, the 4th witch meeting it is (1-3) and the digits after the minus-sign tells the day of the month (1-31)
The problem is to get the value out of the variable so i can store it in my mySQL database. it no problem to create a variable that holds the name of the variable that contains the data, but then??? The value of the variable $q is 'tar1-1' and I want to access the variable $tar1-1.....
I can't find any way to solve this, can you? Someone most have created a calendar like this before...
Please respond to per
kallin.nu
/Per Kallin
attached mail follows:
Is there a good tutorial on Classes?
I looked at countless class codes but I don't understand how they are implemented (not to mention countless books too).
Can someone point me to a good tutorial or explain to me whats going on ?
----------------------- David Chua -----------------------
attached mail follows:
Thanks for all your help. I've settled for an enum field for the time being. I'm going to try something more complex at a later stage.
Thanks again,
Cheers, Jord
attached mail follows:
Michael Kimsal wrote: > > Although I somewhat agree with the webmin sentiment, > after having tried to do simple maintenance on a cobalt for someone, > it seems a real dog for anything outside the normal scope of what > they want you to do. We needed to edit an httpd.conf file, > but there doesn't seem to be a way to do it. Ditto for restarting Apache. > Add a MIME type? No dice. > > Webmin is not the slickest interface, but seems to offer a lot of flexibility. > > Rather than rewriting something, perhaps you could vounteer to design > a better interface for existing webmin stuff. > > A PHP-based version of webmin would be nice, but it's already a rather > developed project, and after considering how to do it myself, I realized > there's a whole hell of a lot of configurations and systems to have to > consider beyond my few linux distros. > > John Huggins wrote: > > > You mention a large desire for a good web based administrator. I wonder if > > there is a version of a web based system administrator available that works > > like Cobalt, but can be installed on any hosting setup. Have you folks > > heard of such a thing? I am aware of Webmin, but am not too impressed with > > it yet. > > > > I have toyed with the idea of writing my own. Jamie, what items do you feel > > must be controllable in a web hosting account administration panel? Yes, we > > all know the basics, like email, dns, etc. but a bulleted list would be a > > good start at organizing a development effort. > >
Ive written something in php - lets you edit your apache, dns email etc. But its for qmail/vmailngr and tinydns set up.
It lets the people on my server do all their dns, apache etc without hassling me about it. A whole webmin type thing in php would be a real pain. The interface is useful when you have a large number of domains and want others to administer them - the people on my server have around 50 + domains each - so having a web interface for it is actually pretty quick. For a few domains it's overkill.
at 4php.com there are some screenshots of it. It's not that hard to put something together similar yourself. I absolutely hate control panels and have vowed never to touch my code again. Write one and it will drive you mad.
attached mail follows:
Hi there,
I get this error every time I try to use a variable that has not been declared. Is this new to PHP4? I do not recall this error in the past, echo $MYVAR echoed nothing if $MYVAR was not set but no error was raised.
How can I revert PHP behavior to 'no-error' with undeclared variables?
Many thanks in advance,
Jorge Alvarez PHP4 new user
attached mail follows:
I'm sure everyone's seen the following:
Warning: Cannot add header information - headers already sent by (output started
But, How can I add check to see if the header information has not been sent and add it if it hasn't (else just print without the header info)?
TIA! Clayton Dukes
attached mail follows:
Clayton, PHP has a function for that:
headers_sent (PHP 3>= 3.0.8, PHP 4 >= 4.0b2) headers_sent -- Returns true if headers have been sent Description boolean headers_sent (void) This function returns true if the HTTP headers have already been sent, false otherwise. See also header()
Cheers, Gianluca
CD> I'm sure everyone's seen the following:
CD> Warning: Cannot add header information - headers already sent by (output started
CD> But, CD> How can I add check to see if the header information has not been sent and add it if it hasn't (else just print without the header info)?
CD> TIA! CD> Clayton Dukes
-- ALBASOFTWARE C/ Mallorca 186 - 3º 1ª 08036 Barcelona (Spain) Tel. +34 93454009 - +34 934549324 Fax. +34 934541979ICQ 47323154
webmaster
albasoftware.com http://www.albasoftware.com http://www.phpauction.org http://www.gianlucabaldo.com
attached mail follows:
Thanks,
How do I do something like: if headers_sent=false include header.inc
else
some other thing
Please forgive my inexperience, I'm still learning :-)
Clayton Dukes
----- Original Message -----
From: "Gianluca Baldo" <webmaster
phpauction.org>
To: "Clayton Dukes" <cdukes
cdukes.com>
Cc: <php-general
lists.php.net>
Sent: Saturday, March 17, 2001 8:55 AM
Subject: Re: [PHP] Headers
> Clayton,
> PHP has a function for that:
>
> headers_sent
> (PHP 3>= 3.0.8, PHP 4 >= 4.0b2)
> headers_sent -- Returns true if headers have been sent
> Description
> boolean headers_sent (void)
> This function returns true if the HTTP headers have already been sent,
false otherwise.
> See also header()
>
> Cheers,
> Gianluca
>
> CD> I'm sure everyone's seen the following:
>
> CD> Warning: Cannot add header information - headers already sent by
(output started
>
> CD> But,
> CD> How can I add check to see if the header information has not been sent
and add it if it hasn't (else just print without the header info)?
>
>
> CD> TIA!
> CD> Clayton Dukes
>
>
>
>
> --
> ALBASOFTWARE
> C/ Mallorca 186 - 3º 1ª
> 08036 Barcelona (Spain)
> Tel. +34 93454009 - +34 934549324
> Fax. +34 934541979
> 
ICQ 47323154 
> webmaster
albasoftware.com
> http://www.albasoftware.com
> http://www.phpauction.org
> http://www.gianlucabaldo.com
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
> How do I do something like: > if headers_sent=false > include header.inc >
if (headers_sent() == false)include 'header.inc';
be sure and check the manual to make sure that "header_sent()" is the correct format.
Brett
attached mail follows:
Hello, this probably no related to PHP, but I don't know where to ask.
When retrieving and updating images from MySql record, I noticed Netscape sometimes fooled by cache values, then it won't show correct image but previous image instead.
How can say to browsers 'hey, please don't cache this <img src....> statement"? Note inside src there is PHP program <img src="show.php?image=....>
I read entire chapter 14.9 "cache control" from http doc but didn't understand .
Thanks
Mig
attached mail follows:
> Hello, this probably no related to PHP, but I don't know where to ask. > > When retrieving and updating images from MySql record, I noticed Netscape sometimes fooled by cache values, then it won't show correct image but previous image instead. > > How can say to browsers 'hey, please don't cache this <img src....> statement"? > Note inside src there is PHP program <img src="show.php?image=....> > > I read entire chapter 14.9 "cache control" from http doc but didn't understand . > > Thanks > > Mig
Hello,
Do a search for no cache in the archives or on google. I don't recall the exact code, but it has been covered a lot in this list.
Brett
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]