[PHP] Invalid or Valid because the same.

2001-03-16 Thread techzeus

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
-




[PHP] Re: Invalid or Valid because the same.

2001-03-16 Thread techzeus



Sorry, heres the attached file.

  - Original Message - 
  From: 
  [EMAIL PROTECTED] 
  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-

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


Re: [PHP] Re: Invalid or Valid because the same.

2001-03-16 Thread techzeus

//HTML headers here

";

if ($count > 0) {
for ($i=0; $i";

}

}

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
{
?>
So sorry, your email is not
valid.

Sent mail.




// Form here


- Original Message -
From: "Jason Lotito" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 16, 2001 10:36 PM
> To: [EMAIL PROTECTED]; '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
> [EMAIL PROTECTED]
> www.newbienetwork.net
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: Invalid or Valid because the same.

2001-03-16 Thread techzeus

Now that, the function has been verified,

what else could be wrong?

- Original Message -
From: "Jack Dempsey" <[EMAIL PROTECTED]>
To: "Jason Lotito" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; "'PHP General List. (E-mail)'"
<[EMAIL PROTECTED]>
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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > > 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."";
> > >
> > > if ($count > 0) {
> > > for ($i=0; $i > > echo $errormsg[$i]."";
> > >
> > > }
> > >
> > > }
> > >
> > > 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
> > > {
> > > ?>
> > > So sorry, your
> > > email is not
> > > valid.
> > >  > >
> > >
> > > }
> > > else if ($num == 1) #Valid
> > > {
> > > ?>
> > > Sent mail.
> > >
> > >
> > >  > >
> > > }
> > >
> > > }
> > >
> > > }
> > > if ($reset == "Reset"){
> > > $username = "";
> > > $real_name = "";
> > > $password = "";
> > > $email = "";
> > > }
> > >
> > >
> > > ?>
> > >
> > > // Form here
> > >
> > >
> > > - Original Message -
> > > From: "Jason Lotito" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > 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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > > > Sent: Friday, March 16, 2001 10:36 PM
> > > > To: [EMAIL PROTECTED]; '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
> > > > [EMAIL PROTECTED]
> > > > www.newbienetwork.net
> > > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> > >
> > >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Classes and Object Oriented Programming

2001-03-17 Thread techzeus

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



[PHP] Editing Variables from another script.

2001-03-17 Thread techzeus

I'm trying to create a form whereby I can edit the variables with just the form.

It will be something like a form for me to change the database 
details(username,server,password) in a .inc I'm using.

Is there anyway for me to pass information into another file's variable and have it 
saved in there?

If anyone have seen Newspro (CGI) before, when you edit some parts in a form, the 
information will be saved. How can it be done in PHP?

--
David Chua
-



Re: [PHP] php under Oracle Web server pleaaaaaaaaaase!

2001-03-19 Thread techzeus

You can still use PHP with Oracle Webserver, www.php.net is the best
resource I found so far :)


- Original Message -
From: "kaab kaoutar" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, March 19, 2001 6:56 PM
Subject: Re: [PHP] php under Oracle Web server pleaase!


> HI!
> DO U MEAN I SHOULD GIVE UP USING PHP under oracle web server ?
> i used to work on php under PWS and apache!
> However i've made a project with ASP under IIS but the client changed his
> mind and wanted to put it in his oracle web server !
> i thought of using php translation from asp ! or at last as long as i
master
> php code it again !
> any idea pleaase!
> Thanks
>
>
> >From: Frank Joerdens <[EMAIL PROTECTED]>
> >To: kaab kaoutar <[EMAIL PROTECTED]>
> >CC: [EMAIL PROTECTED]
> >Subject: Re: [PHP] php under Oracle Web server  pleaase!
> >Date: Mon, 19 Mar 2001 11:41:42 +0100
> >
> >On Mon, Mar 19, 2001 at 10:27:19AM -, kaab kaoutar wrote:
> > > Hello
> > >
> > > Is it possible to work with php under an oracle server ?
> > > If yes can u point me to some manuals and articles
> >
> >AFAIK, the Oracle Web server is not Open Source; hence it would be
> >difficult to support it directly. You can always use the CGI or servlet
> >options though. All the stuff for other web servers besides Apache is in
> >the source tree under:
> >
> >/usr/src/php-4.0.4/sapi/
> >
> >Regards, Frank
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
> _
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Editing Variables from another script.

2001-03-20 Thread techzeus

Okay, basically,

I'm trying to create a script such that it will change the variables inside
of my .inc page.

Something like

lets say I have this file called "database.inc"
Inside it I have :

$dbhost = 'blah'
$dbuser= 'blah'
$dbpass= 'blah'

I would like to make a script such that I can modify the $variables into
something else like, $dbhost into localhost.

How can it be done?
- Original Message -
From: "Jason Stechschulte" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "'PHP General List. (E-mail)'" <[EMAIL PROTECTED]>
Sent: Monday, March 19, 2001 11:03 PM
Subject: Re: [PHP] Editing Variables from another script.


> On Sun, Mar 18, 2001 at 01:06:34PM +0800, [EMAIL PROTECTED] wrote:
>
> > I'm trying to create a form whereby I can edit the variables with just
the form.
> >
> > It will be something like a form for me to change the database
details(username,server,password) in a .inc I'm using.
> >
> > Is there anyway for me to pass information into another file's variable
and have it saved in there?
> >
> > If anyone have seen Newspro (CGI) before, when you edit some parts in a
form, the information will be saved. How can it be done in PHP?
>
> There is probably a hundred or more ways this can be done.  For me to be
> able to give you specifics, you will have to be more specific with what
> you are doing and what you have tried.
>
> --
> Jason Stechschulte
> [EMAIL PROTECTED]
> --
> Well, I think Perl should run faster than C.  :-)
>  -- Larry Wall in <[EMAIL PROTECTED]>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Editing Variables from another script.

2001-03-20 Thread techzeus

I think you didn't get what I meant,

I need a script such that I can change the content of database.inc from an
external script (form or whatever)


- Original Message -
From: "Stewart Taylor" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, March 20, 2001 5:57 PM
Subject: RE: [PHP] Editing Variables from another script.


>
>
> include "database.inc"
> .
> .
> .
> .
> $dbhost='localhost';
>
>
>
> -Stewart
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: 20 March 2001 09:26
> To: Jason Stechschulte
> Cc: 'PHP General List. (E-mail)'
> Subject: Re: [PHP] Editing Variables from another script.
>
>
> Okay, basically,
>
> I'm trying to create a script such that it will change the variables
inside
> of my .inc page.
>
> Something like
>
> lets say I have this file called "database.inc"
> Inside it I have :
>
> $dbhost = 'blah'
> $dbuser= 'blah'
> $dbpass= 'blah'
>
> I would like to make a script such that I can modify the $variables into
> something else like, $dbhost into localhost.
>
> How can it be done?
> - Original Message -
> From: "Jason Stechschulte" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Cc: "'PHP General List. (E-mail)'" <[EMAIL PROTECTED]>
> Sent: Monday, March 19, 2001 11:03 PM
> Subject: Re: [PHP] Editing Variables from another script.
>
>
> > On Sun, Mar 18, 2001 at 01:06:34PM +0800, [EMAIL PROTECTED] wrote:
> >
> > > I'm trying to create a form whereby I can edit the variables with just
> the form.
> > >
> > > It will be something like a form for me to change the database
> details(username,server,password) in a .inc I'm using.
> > >
> > > Is there anyway for me to pass information into another file's
variable
> and have it saved in there?
> > >
> > > If anyone have seen Newspro (CGI) before, when you edit some parts in
a
> form, the information will be saved. How can it be done in PHP?
> >
> > There is probably a hundred or more ways this can be done.  For me to be
> > able to give you specifics, you will have to be more specific with what
> > you are doing and what you have tried.
> >
> > --
> > Jason Stechschulte
> > [EMAIL PROTECTED]
> > --
> > Well, I think Perl should run faster than C.  :-)
> >  -- Larry Wall in <[EMAIL PROTECTED]>
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Editing Variables from another script.

2001-03-20 Thread techzeus

What other ways might there be ?


- Original Message -
From: "Neil Kimber" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Stewart Taylor"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, March 20, 2001 6:10 PM
Subject: RE: [PHP] Editing Variables from another script.


> Do you mean that you want to alter the physical contents of
'database.inc'?
> This would require you parsing the existing file yourself, writing a new
> version of the file, altering the relevant line of code, removing the
> original file and renaming your new file to the original filename.
>
> This isn't a good approach, are you sure there isn't a different way for
you
> acheive your aims?
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: 20 March 2001 10:02
> To: Stewart Taylor; [EMAIL PROTECTED]
> Subject: Re: [PHP] Editing Variables from another script.
>
>
> I think you didn't get what I meant,
>
> I need a script such that I can change the content of database.inc from an
> external script (form or whatever)
>
>
> - Original Message -
> From: "Stewart Taylor" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Tuesday, March 20, 2001 5:57 PM
> Subject: RE: [PHP] Editing Variables from another script.
>
>
> >
> >
> > include "database.inc"
> > .
> > .
> > .
> > .
> > $dbhost='localhost';
> >
> >
> >
> > -Stewart
> >
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > Sent: 20 March 2001 09:26
> > To: Jason Stechschulte
> > Cc: 'PHP General List. (E-mail)'
> > Subject: Re: [PHP] Editing Variables from another script.
> >
> >
> > Okay, basically,
> >
> > I'm trying to create a script such that it will change the variables
> inside
> > of my .inc page.
> >
> > Something like
> >
> > lets say I have this file called "database.inc"
> > Inside it I have :
> >
> > $dbhost = 'blah'
> > $dbuser= 'blah'
> > $dbpass= 'blah'
> >
> > I would like to make a script such that I can modify the $variables into
> > something else like, $dbhost into localhost.
> >
> > How can it be done?
> > - Original Message -
> > From: "Jason Stechschulte" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Cc: "'PHP General List. (E-mail)'" <[EMAIL PROTECTED]>
> > Sent: Monday, March 19, 2001 11:03 PM
> > Subject: Re: [PHP] Editing Variables from another script.
> >
> >
> > > On Sun, Mar 18, 2001 at 01:06:34PM +0800, [EMAIL PROTECTED]
wrote:
> > >
> > > > I'm trying to create a form whereby I can edit the variables with
just
> > the form.
> > > >
> > > > It will be something like a form for me to change the database
> > details(username,server,password) in a .inc I'm using.
> > > >
> > > > Is there anyway for me to pass information into another file's
> variable
> > and have it saved in there?
> > > >
> > > > If anyone have seen Newspro (CGI) before, when you edit some parts
in
> a
> > form, the information will be saved. How can it be done in PHP?
> > >
> > > There is probably a hundred or more ways this can be done.  For me to
be
> > > able to give you specifics, you will have to be more specific with
what
> > > you are doing and what you have tried.
> > >
> > > --
> > > Jason Stechschulte
> > > [EMAIL PROTECTED]
> > > --
> > > Well, I think Perl should run faster than C.  :-)
> > >  -- Larry Wall in <[EMAIL PROTECTED]>
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> > >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Editing Variables from another script.

2001-03-20 Thread techzeus

Basically, thats not what I'm going to do.

I'm making an administrative script such that admins can change the location
and values of the $dbhost, $dbuser, $dbpass in the database.inc with just a
form.

Kinda tough eh ?

- Original Message -
From: "Neil Kimber" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Stewart Taylor"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, March 20, 2001 10:25 PM
Subject: RE: [PHP] Editing Variables from another script.


> It depends upon what your overall aim actually is.
>
> If you want a different value depending upon where this file is being used
> in your site, then you should probably just set the value accordingly in
> that part of the site.
> i.e.
> > > include "database.inc"
> > > .
> > > .
> > > .
> > > .
> > > $dbhost='localhost';
>
> If you want a different value in the same place based upon a different
> 'user' or other criteria, then you should probably write some logic to
> handle the situation.
> i.e.
>
> include "database.inc";
>
> if (MYCRITERIA)
> {
> $dbhost='localhost';
> }
>
> The only reason that I can think of for you wanting to change the physical
> file would be if you are writing some code to generate a release for
> different users. In which case, you'll probably want to build a parser and
> use some kind of templating system.
>
> Neil
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: 20 March 2001 14:08
> To: Neil Kimber; Stewart Taylor; [EMAIL PROTECTED]
> Subject: Re: [PHP] Editing Variables from another script.
>
>
> What other ways might there be ?
>
>
> - Original Message -
> From: "Neil Kimber" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; "Stewart Taylor"
> <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Tuesday, March 20, 2001 6:10 PM
> Subject: RE: [PHP] Editing Variables from another script.
>
>
> > Do you mean that you want to alter the physical contents of
> 'database.inc'?
> > This would require you parsing the existing file yourself, writing a new
> > version of the file, altering the relevant line of code, removing the
> > original file and renaming your new file to the original filename.
> >
> > This isn't a good approach, are you sure there isn't a different way for
> you
> > acheive your aims?
> >
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > Sent: 20 March 2001 10:02
> > To: Stewart Taylor; [EMAIL PROTECTED]
> > Subject: Re: [PHP] Editing Variables from another script.
> >
> >
> > I think you didn't get what I meant,
> >
> > I need a script such that I can change the content of database.inc from
an
> > external script (form or whatever)
> >
> >
> > - Original Message -
> > From: "Stewart Taylor" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > Sent: Tuesday, March 20, 2001 5:57 PM
> > Subject: RE: [PHP] Editing Variables from another script.
> >
> >
> > >
> > >
> > > include "database.inc"
> > > .
> > > .
> > > .
> > > .
> > > $dbhost='localhost';
> > >
> > >
> > >
> > > -Stewart
> > >
> > > -Original Message-
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > > Sent: 20 March 2001 09:26
> > > To: Jason Stechschulte
> > > Cc: 'PHP General List. (E-mail)'
> > > Subject: Re: [PHP] Editing Variables from another script.
> > >
> > >
> > > Okay, basically,
> > >
> > > I'm trying to create a script such that it will change the variables
> > inside
> > > of my .inc page.
> > >
> > > Something like
> > >
> > > lets say I have this file called "database.inc"
> > > Inside it I have :
> > >
> > > $dbhost = 'blah'
> > > $dbuser= 'blah'
> > > $dbpass= 'blah'
> > >
> > > I would like to make a script such that I can modify the $variables
into
> > > something else like, $dbhost into localhost.
> > >
> > > How can it be done?
> > > - Original Message -
> > > From: "Jason Stechschulte" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Cc: "'PHP General List. (E-mail)'" <[EMAIL PROTECTED]>
> > > Sent: Monday, March 19, 2001 11:03 PM
> > > Subject: Re: [PHP] Editing Variables from another script.
> > >
> > >
> > > > On Sun, Mar 18, 2001 at 01:06:34PM +0800, [EMAIL PROTECTED]
> wrote:
> > > >
> > > > > I'm trying to create a form whereby I can edit the variables with
> just
> > > the form.
> > > > >
> > > > > It will be something like a form for me to change the database
> > > details(username,server,password) in a .inc I'm using.
> > > > >
> > > > > Is there anyway for me to pass information into another file's
> > variable
> > > and have it saved in there?
> > > > >
> > > > > If anyone have seen Newspro (CGI) before, when you edit some parts
> in
> > a
> > > form, the information will be saved. How can it be done in PHP?
> > > >
> > > > There is probably a hundred or more ways this can be done.  For me
to
> be
> > > > able to give you specifics, you will have to be more specific with
> what
> > > > you are doing and what you have tried.
> > > >
> > > > --
> > > > Jason St

Re: [PHP] Editing Variables from another script.

2001-03-21 Thread techzeus

What are the functions that can achieve that ?

- Original Message -
From: "Neil Kimber" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Stewart Taylor"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, March 21, 2001 12:24 AM
Subject: RE: [PHP] Editing Variables from another script.


> Gotya. The why not limit your include file to only contain those values
that
> are important to you. So you get something like:
>
> varsdatabase.inc
>
> $dbhost="x";
> $dbuser="y";
> $dbpass="z";
>
> Then, in your PHP code you just rewrite this simple file. That way you
don't
> have to worry about parsing files etc... Just delete the existing
> varsdatabase.inc and build a new one from scratch. It's no longer
difficult
> because it's only 3 lines long.
>
>
>
>
> > > > $dbhost='localhost';
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: 20 March 2001 14:26
> To: Neil Kimber; Stewart Taylor; [EMAIL PROTECTED]
> Subject: Re: [PHP] Editing Variables from another script.
>
>
> Basically, thats not what I'm going to do.
>
> I'm making an administrative script such that admins can change the
location
> and values of the $dbhost, $dbuser, $dbpass in the database.inc with just
a
> form.
>
> Kinda tough eh ?
>
> - Original Message -
> From: "Neil Kimber" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; "Stewart Taylor"
> <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Tuesday, March 20, 2001 10:25 PM
> Subject: RE: [PHP] Editing Variables from another script.
>
>
> > It depends upon what your overall aim actually is.
> >
> > If you want a different value depending upon where this file is being
used
> > in your site, then you should probably just set the value accordingly in
> > that part of the site.
> > i.e.
> > > > include "database.inc"
> > > > .
> > > > .
> > > > .
> > > > .
> > > > $dbhost='localhost';
> >
> > If you want a different value in the same place based upon a different
> > 'user' or other criteria, then you should probably write some logic to
> > handle the situation.
> > i.e.
> >
> > include "database.inc";
> >
> > if (MYCRITERIA)
> > {
> > $dbhost='localhost';
> > }
> >
> > The only reason that I can think of for you wanting to change the
physical
> > file would be if you are writing some code to generate a release for
> > different users. In which case, you'll probably want to build a parser
and
> > use some kind of templating system.
> >
> > Neil
> >
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > Sent: 20 March 2001 14:08
> > To: Neil Kimber; Stewart Taylor; [EMAIL PROTECTED]
> > Subject: Re: [PHP] Editing Variables from another script.
> >
> >
> > What other ways might there be ?
> >
> >
> > - Original Message -
> > From: "Neil Kimber" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>; "Stewart Taylor"
> > <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > Sent: Tuesday, March 20, 2001 6:10 PM
> > Subject: RE: [PHP] Editing Variables from another script.
> >
> >
> > > Do you mean that you want to alter the physical contents of
> > 'database.inc'?
> > > This would require you parsing the existing file yourself, writing a
new
> > > version of the file, altering the relevant line of code, removing the
> > > original file and renaming your new file to the original filename.
> > >
> > > This isn't a good approach, are you sure there isn't a different way
for
> > you
> > > acheive your aims?
> > >
> > > -Original Message-
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > > Sent: 20 March 2001 10:02
> > > To: Stewart Taylor; [EMAIL PROTECTED]
> > > Subject: Re: [PHP] Editing Variables from another script.
> > >
> > >
> > > I think you didn't get what I meant,
> > >
> > > I need a script such that I can change the content of database.inc
from
> an
> > > external script (form or whatever)
> > >
> > >
> > > - Original Message -
> > > From: "Stewart Taylor" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > > Sent: Tuesday, March 20, 2001 5:57 PM
> > > Subject: RE: [PHP] Editing Variables from another script.
> > >
> > >
> > > >
> > > >
> > > > include "database.inc"
> > > > .
> > > > .
> > > > .
> > > > .
> > > > $dbhost='localhost';
> > > >
> > > >
> > > >
> > > > -Stewart
> > > >
> > > > -Original Message-
> > > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > > > Sent: 20 March 2001 09:26
> > > > To: Jason Stechschulte
> > > > Cc: 'PHP General List. (E-mail)'
> > > > Subject: Re: [PHP] Editing Variables from another script.
> > > >
> > > >
> > > > Okay, basically,
> > > >
> > > > I'm trying to create a script such that it will change the variables
> > > inside
> > > > of my .inc page.
> > > >
> > > > Something like
> > > >
> > > > lets say I have this file called "database.inc"
> > > > Inside it I have :
> > > >
> > > > $dbhost = 'blah'
> > > > $dbuser= 'blah'
> > > > $dbpass= 'blah'
> > > >
> > > > I would like to make a script such 

[PHP] Lostpassword script Error

2001-03-21 Thread techzeus

Hi there, I need some help here.

I have uploaded all the files necessary into my server. grab it at 
www.frozened.com/zeus/lostpassword.zip

This is a lostpassword script whereby when the user inputs his email address, the 
script will check if his email is a valid email ( [EMAIL PROTECTED] ) after which it will 
use the database to search for the email and if there his email is in the db, it will 
send him a mail telling him so.

In this script I haven't add the mail() but replaced it with a echo() so that I know 
that the form has been processed.

When I run the script and input a 'non-valid' email address ( no @ sign ), the 
errormsg will appear as normal but when I type a valid email or a email that is in the 
database, the form will just clear it self and reappear.

Mind if someone help me debug (I'm new to PHP).

Thanks :)


Zeus





Re: [PHP] Response.Write [OK]

2001-03-21 Thread techzeus

no.

Imagine Response.write as echo.

so it will be

echo "OK";

PHP doesn't parse ASP tags

- Original Message -
From: "AJDIN BRANDIC" <[EMAIL PROTECTED]>
To: "Jon Haworth" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, March 21, 2001 8:24 PM
Subject: RE: [PHP] Response.Write [OK]


> You think I need to do something like
>
> echo'Response.Write[OK]';
>
> This will print Response.Write [OK] on he screen or
>
> Ajdin
>
>
> On Wed, 21 Mar 2001, Jon Haworth wrote:
>
> > You could investigate www.php.net/echo, I think it's what you're after.
> >
> > Cheers
> > Jon
> >
> >
> > -Original Message-
> > From: AJDIN BRANDIC [mailto:[EMAIL PROTECTED]]
> > Sent: 21 March 2001 12:05
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] Response.Write [OK]
> >
> >
> > Hi,
> >
> > I have built a shopping cart and have made connection to an Internet
> > payment company.  Now once transaction is processed they want from my
> > confirmation page to receive an "[OK]".  How can I do this with php3/4?
> >
> > Response.Write"[OK]" is what ASP uses, I think???
> >
> >
> > Thanks
> >
> > Ajdin
> >
> >
> > **
> > 'The information included in this Email is of a confidential nature and
is
> > intended only for the addressee. If you are not the intended addressee,
> > any disclosure, copying or distribution by you is prohibited and may be
> > unlawful. Disclosure to any party other than the addressee, whether
> > inadvertent or otherwise is not intended to waive privilege or
confidentiality'
> >
> > **
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Lostpassword script Error

2001-03-22 Thread techzeus

Nobody can help?

- Original Message -
From: <[EMAIL PROTECTED]>
To: "'PHP General List. (E-mail)'" <[EMAIL PROTECTED]>
Sent: Wednesday, March 21, 2001 8:29 PM
Subject: [PHP] Lostpassword script Error


Hi there, I need some help here.

I have uploaded all the files necessary into my server. grab it at
www.frozened.com/zeus/lostpassword.zip

This is a lostpassword script whereby when the user inputs his email
address, the script will check if his email is a valid email (
[EMAIL PROTECTED] ) after which it will use the database to search for the email
and if there his email is in the db, it will send him a mail telling him so.

In this script I haven't add the mail() but replaced it with a echo() so
that I know that the form has been processed.

When I run the script and input a 'non-valid' email address ( no @ sign ),
the errormsg will appear as normal but when I type a valid email or a email
that is in the database, the form will just clear it self and reappear.

Mind if someone help me debug (I'm new to PHP).

Thanks :)


Zeus





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Let the Server do the downloading

2001-03-25 Thread techzeus

Is it possible?

Have anyone made a script that allows you to grab a file from another URL directly 
from the server so that you don't need to download the file and upload it again?


Chua Zhi Hon aka. Zeus
-
Founder/CEO, Frozened Network
"We provide you with the tools needed to setup an online business"
http://www.frozened.com
Editorial, paGn.net
http://www.pagn.net 



Re: [PHP] A ToDo/ task list

2001-03-27 Thread techzeus

I think Sourceforge uses something like what you are talking about.

Check it out :

http://www.sourceforge.net 

- Original Message - 
From: "Harshdeep S Jawanda" <[EMAIL PROTECTED]>
To: "PHP General" <[EMAIL PROTECTED]>
Sent: Tuesday, March 27, 2001 9:29 PM
Subject: [PHP] A ToDo/ task list


> Hi ppl,
> 
> I have been thinking of using PHP to make a ToDo/task list type of
> application. I am looking for something different from the usual
> Personal Information Managers (PIMs) - they are oriented more towards
> appointments than tasks.
> 
> Does anybody know of any ongoing (preferably open source) projects in
> PHP of a similar nature?
> 
> I would like to be able to open/create a task, maybe assign it to
> somebody, be able to add comments to it, have user authentication and
> the most desired (though uncommon) feature is: a change log. Through a
> change log, I want to be able to trace the who and when of comments
> added to a task etc.
> 
> Any help/pointers will be highly appreciated. Thanks,
> 
> --
> Regards,
> Harshdeep Singh Jawanda.
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]