[PHP] perplexed as to why this is happening...

2002-11-24 Thread Peter Houchin
Howdy,

I'm doing a simple db check.. grabbing a db value, in this case $sec, based
on the user name registered in the session,
I've created a user called test with $sec  equal to "2" but when i get to
the second echo of $sec the value has changed to "1" and I can't understand
why... can some one please give me some idea as to why this is happening?

elseif ($_POST['cost'] >=11){
//query db
$res = mysql_query("SELECT sec FROM users WHERE uname='$_SESSION[uname]'");
$num = mysql_numrows($res) ;
if ($num == 1) {
//get results
$sec = mysql_result($res, 0, 'sec');
echo $sec; // pulls out sec as 2 ( as is sposed to )
}
if (!$sec = "1"){
echo "please contact your nearest
representive";
}
else {
echo $sec; // on this echo $sec has changed value from 2 to 1

Cheers

Peter
"the only dumb question is the one that wasn't asked"



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




RE: [PHP] perplexed as to why this is happening...

2002-11-24 Thread Peter Houchin
thanks for that .. I must be going blind :)

> -Original Message-
> From: Michael Hazelden [mailto:[EMAIL PROTECTED]]
> Sent: Monday, 25 November 2002 11:44 AM
> To: 'Peter Houchin'; php_gen
> Subject: RE: [PHP] perplexed as to why this is happening...
> 
> 
> Ahem ...
> 
> $sec=1 means "set $sec to 1"
> 
> You want
> 
> $sec==1
> 
> :-)
> 
> M.
> 
> -Original Message-
> From: Peter Houchin [mailto:[EMAIL PROTECTED]]
> Sent: 25 November 2002 00:53
> To: php_gen
> Subject: [PHP] perplexed as to why this is happening...
> 
> 
> Howdy,
> 
> I'm doing a simple db check.. grabbing a db value, in this case 
> $sec, based
> on the user name registered in the session,
> I've created a user called test with $sec  equal to "2" but when i get to
> the second echo of $sec the value has changed to "1" and I can't 
> understand
> why... can some one please give me some idea as to why this is happening?
> 
> elseif ($_POST['cost'] >=11){
> //query db
> $res = mysql_query("SELECT sec FROM users WHERE 
> uname='$_SESSION[uname]'");
> $num = mysql_numrows($res) ;
> if ($num == 1) {
> //get results
> $sec = mysql_result($res, 0, 'sec');
> echo $sec; // pulls out sec as 2 ( as is sposed to )
> }
> if (!$sec = "1"){
> echo "please contact your nearest
> representive";
> }
> else {
> echo $sec; // on this echo $sec has changed value from 2 to 1
> 
> Cheers
> 
> Peter
> "the only dumb question is the one that wasn't asked"
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> _
> This message has been checked for all known viruses by the 
> MessageLabs Virus Control Centre.
> 
> This message has been checked for all known viruses by the 
> MessageLabs Virus Control Centre.
> 
>   
> *
> 
> Notice:  This email is confidential and may contain copyright 
> material of Ocado Limited (the "Company"). Opinions and views 
> expressed in this message may not necessarily reflect the 
> opinions and views of the Company.
> If you are not the intended recipient, please notify us 
> immediately and delete all copies of this message. Please note 
> that it is your responsibility to scan this message for viruses.
> 
> Company reg. no. 3875000.  Swallowdale Lane, Hemel Hempstead HP2 7PY
> 
> *
> 
> -- 
> 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] forum module for NUKE?

2002-11-25 Thread Peter Houchin
there's sort of one in there already ... but also check out
http://www.nukescripts.net/ and that has links off that for other nuke
sites/add on's

> -Original Message-
> From: The Gabster [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 26 November 2002 9:35 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] forum module for NUKE?
>
>
> Hi all,
>
> I am looking for a php forum module for NUKE portal system. I am
> specifically looking for the same functionality as yahoogroups
> has where the
> user can post/receive messages on a specified email address- beside
> accessing the forum via the web.
>
> Thanks a lot,
> GAbi.
>
> __
> http://65.104.178.73/marshall/
>
>
>
> --
> 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] Warning with Header("Location: test.php")

2002-11-25 Thread Peter Houchin
your header command must go before any other out put to the page ..

eg

 

boo

 etc

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 26 November 2002 3:02 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Warning with Header("Location: test.php")
>
>
> I have user Header("Location: test.php") in a php file. It is not working,
> instead I have got a warning of the form
>
> Warning: Cannot add header information - headers already sent by (output
> started at /var/www/html/test.php:5) in /var/www/html/test.php on line 15
>
> Here line 15 contains the Header ("Location:test.php") line.
> I will be grateful if you can help me.
>
>
> --
> 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] deleting a record.

2002-11-26 Thread Peter Houchin
howdy all,
this should be fairly simple but not turning out to be so am asking for a
little help..
I have a script that fetches all the records in a table and display's them
on the screen.
I get and display the records with the following:
".$myrow['id']."  ".$myrow['company']."";
printf("(DELETE)",
$PHP_SELF, $myrow["id"]);
}?>

now when I click on delete it just reloads the page and doesn't delete the
record. I have this code before anything else on the page to handle the
delete...

if($delete){
$res= mysql_query("DELETE FROM resellers WHERE id=$id");
header("Location: admin2.php?op=resellers");
}

I am relying on the $delete and $id to be set by the url link.

any idea's as I'd like to be able to do this with out having to use a form
with hidden vars..

Cheers

Peter
"the only dumb question is the one that wasn't asked"



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




RE: [PHP] Re: deleting a record.

2002-11-26 Thread Peter Houchin
Thanks Kyle, got it working like a treat :) for some reason it wasn't
selecting the DB but it is now :D

> -Original Message-
> From: Kyle Gibson [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 27 November 2002 10:05 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Re: deleting a record.
>
>
> >  > // get the list of resellers from the db
> > $res = mysql_query("SELECT * FROM resellers ORDER BY id");
> >
> > // print all records in the DB
> > while ($myrow = mysql_fetch_array($res)){
> > echo " > class=\"content\">".$myrow['id']."
>   > align='justify'> > class=\"content\">".$myrow['company']."";
> > printf(" >
> href=\"%s?op=resellers&id=%s&delete=yes\">(DELETE)",
> > $PHP_SELF, $myrow["id"]);
> > }?>
>
> There's an easier way to display this. It should make your life
> easier...made mine.
>
> Take a look:
>
>  // get the list of resellers from the db
> $res = mysql_query("SELECT * FROM resellers ORDER BY id");
>
> // print all records in the DB
> while ($myrow = mysql_fetch_array($res)): ?>
> 
> 
>  
> 
> 
> 
> (DELETE)
> 
>
>
> > now when I click on delete it just reloads the page and doesn't
> delete the
> > record. I have this code before anything else on the page to handle the
> > delete...
> >
> > if($delete){
> > $res= mysql_query("DELETE FROM resellers WHERE id=$id");
> > header("Location: admin2.php?op=resellers");
> > }
>
> What you should do here is check to see if $res is failing, simply by
> doing the following:
>
> if(!$res) echo "error";
>
> Then, place an 'exit;' after the header(...) command to see if the
> $delete variable is actually being passed.
>
> --
> Kyle Gibson
> admin(at)frozenonline.com
> http://www.frozenonline.com/
>
>
> --
> 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] displaying record number in a cell in a table

2002-11-26 Thread Peter Houchin
howdy,

I've had a look around and haven't been able to find what I'm after..

What I'm trying to do is display the number of each individual record with
in a table in a db WITH OUT relying on the records id, here what I've come
up with so far:

//get and count the number of records in the table
$result = mysql_query("SELECT count(*) AS num FROM resellers");
$num = mysql_result($result,0,"num");

//display the number of records
for ($i = 1; $i <= $num; $i++) {?>




http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] displaying record number in a cell in a table

2002-11-26 Thread Peter Houchin
Thanks Robert

> -Original Message-
> From: Van Andel, Robert [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 27 November 2002 11:43 AM
> To: Peter Houchin; php_gen
> Subject: RE: [PHP] displaying record number in a cell in a table
>
>
> $result = mysql_query("select * from [database table]");
>
> echo "";
>
> while($data = mysql_fetch_array($result))
> {
>   $count++;
>   echo "";
>   echo "$count";
>   echo "$data[0]";
>   echo "$data[1]";
>   ...and so on
>   echo "";
>
> }
>
> echo "";
>
> This will give you a row number for each row.
>
> Robbert van Andel
>
> -Original Message-
> From: Peter Houchin [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 26, 2002 4:49 PM
> To: php_gen
> Subject: [PHP] displaying record number in a cell in a table
>
>
> howdy,
>
> I've had a look around and haven't been able to find what I'm after..
>
> What I'm trying to do is display the number of each individual record with
> in a table in a db WITH OUT relying on the records id, here what I've come
> up with so far:
>
> //get and count the number of records in the table
> $result = mysql_query("SELECT count(*) AS num FROM resellers");
> $num = mysql_result($result,0,"num");
>
> //display the number of records
> for ($i = 1; $i <= $num; $i++) {?>
> 
> 
> print $i;?>
> 
> 
> 
> now this all works except that it displays 12345etc in every cell of the
> html table when i need it to display as
>
> 1
> 2
> 3
> 4
> 5
> etc
>
> with each number on a new row in the html table ..
>
> TIA & I hope i've made what am after clear enough...
>
> Cheers
>
> Peter
> "the only dumb question is the one that wasn't asked"
>
>
>
> --
> 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




RE: [PHP] Postnuke --- Meta keywords and title different for all the pages...

2002-11-28 Thread Peter Houchin
Howdy,

um what exactly do you want to do? add meta tag's to each individual
page?

> -Original Message-
> From: Manoj Nahar [mailto:[EMAIL PROTECTED]]
> Sent: Friday, 29 November 2002 5:26 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Postnuke --- Meta keywords and title different for all
> the pages...
>
>
> Hi there,
>
> I would like to know has anybody being able to do this.
>
> Each page has its own meta keywords and title.
>
> I have searched lot of information about it but no luck.
>
> any help or pointer with this would be greatly appreciated.
>
> Manoj
>
>
> --
> 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] apache httpd-2.0.40-8 and scanning alternate extensions for php

2002-12-01 Thread Peter Houchin
if its not there add it

> -Original Message-
> From: Larry Brown [mailto:[EMAIL PROTECTED]]
> Sent: Monday, 2 December 2002 10:31 AM
> To: PHP List; Evan Nemerson
> Subject: RE: [PHP] apache httpd-2.0.40-8 and scanning alternate
> extensions for php
>
>
> That's what I'm saying, there is absolutely no mention of php in
> httpd.conf.
> That line does not exist.  It does in previous versions of RedHat
> / Apache.
> Is it possible that this is some kind of RedHat modification?
>
> Larry S. Brown
> Dimension Networks, Inc.
> (727) 723-8388
>
> -Original Message-
> From: Evan Nemerson [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, December 01, 2002 4:53 PM
> To: Larry Brown; [EMAIL PROTECTED]
> Subject: Re: [PHP] apache httpd-2.0.40-8 and scanning alternate extensions
> for php
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Find the line that looks like "AddType application/x-httpd-php .php", and
> change it to "AddType application/x-httpd-php .php .html"
>
>
> On Sunday 01 December 2002 01:34 pm, Larry Brown wrote:
> > I just moved to a machine with RH8 that has their latest version of
> apache.
> > On prior versions httpd.conf had a section that I could set to have the
> > server scan .html extensions for php tags.  There is no longer such a
> > section even though the server does appropriately scan .php files.  Does
> > anyone know how I can have it scan different extensions?
> >
> > Larry S. Brown
> > Dimension Networks, Inc.
> > (727) 723-8388
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.0.7 (GNU/Linux)
>
> iD8DBQE96oTZ/rncFku1MdIRAlXQAJ9lV5cmg2MLXnnSIVsFWW157+puBQCfTzya
> TGBEeaXx+9XlBxHbzEtWwos=
> =Ajqh
> -END PGP SIGNATURE-
>
>
>
> --
> 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] hiding php

2002-12-02 Thread Peter Houchin
yes look around for sum thing like chilli soft from sun microsystems, but
it's not free.. i dunno if there is a free one..

> -Original Message-
> From: Larry Brown [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 3 December 2002 4:13 PM
> To: PHP List
> Subject: [PHP] hiding php
>
>
> This should bump up my popularity here...can you run asp on apache?  The
> reason I ask is that I understand you can use a php option to
> hide the fact
> that you are running php.  This sounds like a good idea to keep people
> guessing, but I also want to use .asp extensions and have them parsed for
> the php tags.  I thought this would be nice if someone wanted to
> screw with
> a site they wouldn't even be trying tools that would apply.
> However, if you
> can't run asp on apache nobody would be fooled.  Any thoughts?
>
> Larry S. Brown
> Dimension Networks, Inc.
> (727) 723-8388
>
>
>
>
> --
> 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] Prevent storing data when reload

2002-12-03 Thread Peter Houchin
yep have the submit got to another page and then have a header location in
there to go back to the original page  that the form is on

> -Original Message-
> From: Lars Espelid [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 4 December 2002 10:17 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Prevent storing data when reload
>
>
> Hello,
>
> I have a php-page whith a form-schema which stores data to a
> mysql-database
> on submit. (The schema posts data to the same page (php-self).)
>
> When I reload the page the data gets stored once more. I'm sure this is a
> well known problem. Are there any smart tricks to prevent this from
> happening?
>
> Thanks!
>
> Lars
>
>
>
> --
> 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] how to make a individual submit...

2002-12-03 Thread Peter Houchin
howdy

i have got me a form, that when submitted is effectlively only one variable,
but when i submit it, it grabs the last field displayed instead of the one
selected.. normally this would be easy but I think because I have it inside
a loop it's playing havock on me..


-[form code in side the while loop] -
// print all records in the DB
while ($myrow = mysql_fetch_array($res)):
$count++;?>


 



// pass on $myrow['id'] to next page


---

--[processing code of the form]--
function usubmit(){
$id = $_POST['number'];
$res=mysql_query("SELECT * from users WHERE id='$id'");
$num = mysql_numrows($res) or die ( Header("Location:
logerror.php?op=log_error") );
$email = mysql_result($res, 0, 'email');
$passwd = mysql_result($res, 0, 'passwd');
$uname = mysql_result($res, 0, 'uname');
$fname = mysql_result($res, 0, 'firstname');
if(!$boo){
echo mysql_error();
} else {
//test output of values
echo $id; // show's id to be the last id in the DB
echo "";
echo $email;
echo "";
echo $uname;
echo "";
echo $passwd;
echo "";
echo $fname;
echo "";
}
---


Cheers

Peter
"the only dumb question is the one that wasn't asked"



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




RE: [PHP] Whimper, help :)

2002-12-03 Thread Peter Houchin
what are the field types in the mysql DB? 

> -Original Message-
> From: John Taylor-Johnston [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 4 December 2002 4:13 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Whimper, help :)
> 
> 
> Tom,
> Anyone,
> 
> No I'm not looking for a ", I'm trying to pass double quotes into MySQL.
> Like I said, it works when debugging:
> 
> http://ccl.flsh.usherb.ca/print/print.html?search=%26quot%3Bready+
> maria%26quot%3B
> http://ccl.flsh.usherb.ca/print/display.test.inc.phps
> 
> but fails when I try to pass my double quotes in:
> 
> http://ccl.flsh.usherb.ca/print/index.html?search=%26quot%3Bready+
> maria%26quot%3B
> http://ccl.flsh.usherb.ca/print/display.table.inc.phps
> 
> $sql = "SELECT id,AU,ST,BT,AT FROM `$table` WHERE MATCH 
> (TNum,YR,AU,ST,SD,BT,BC,AT,PL,PR,PG,LG,AUS,KW,GEO,AN,RB,CO) 
> AGAINST ('".stripslashes($search)."' IN BOOLEAN MODE) ORDER BY id asc";
> 
> I already have the  $search
> 
> I have tried many variations.
> 
> > If you are looking for " in a string just quote it with '
> > example
> > $like = '"ready maria"';
> > $ sql = " SELECT .. WHERE  LIKE '$like'";
> > no need to escape anything
> 
> 
> -- 
> 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] passing sessions via POST

2002-12-04 Thread Peter Houchin


> -Original Message-
> From: Myrage [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 5 December 2002 3:55 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] passing sessions via POST
>
>
> How do we pass sessions via post ?? I seem to lose the session once it has
> been submitted through the POST Method.
>
> Any help??

to set sessions 1st make sure session_start(); is towards, if not at, the
top of every page
to set session vars $_SESSION[var] = $_POST[var]
to call a session var echo $_SESSION[var];


Cheers
Peter


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




RE: [PHP] Solaris

2002-12-08 Thread Peter Houchin
Kris,

a couple of options for you to try are http://www.sun.com/bigadmin
http://www.solariscentral.com also have a search in google

also you can try this... resart the machine and press stop a after the
banner comes up and you get the "ok" prompt .. then type boot -s (for single
user mode) (you will need to know the root password) it will come up with a
message saying something like .. you are about to enter into maintance
mode.. press control-c to proceed in normal start up mode.

once you have entered in the root password you will be able to mode around
the directories via the command line .. then is a simple matter of tying cd
/etc/rc2.d ; rm 

> -Original Message-
> From: Kris [mailto:[EMAIL PROTECTED]]
> Sent: Monday, 9 December 2002 12:04 PM
> To: PHP List
> Subject: [PHP] Solaris
>
>
> Sorry I know this is off subject but I'm in a bind.
>
> I have a problem with my Solaris box booting up.
> Does I fairly new to all of this so does anybody know a good
> newsgroup for Solaris??
>
> My problem is I added a file so a program would auto load. I
> added the file to etc/rc2.d
> Now this program loads perfect but continues to run and the rest
> of the O/S can't load.
> How can I access that director to delete the file??
>
> Thanks for any help
>
> Kris
>
>


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




RE: [PHP] Can anyone help? PHP script/MySQL problem

2002-12-10 Thread Peter Houchin
Steven,

given what you've just said have you double checked that the spelling is the
same for the field names in your code and also in the db.. also have you
tried to just pass the info on to another page and displaying it?

> -Original Message-
> From: Steven M [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 11 December 2002 10:26 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Can anyone help? PHP script/MySQL problem
>
>
> Rich,
>
> I'm not getting any error messages.  I have just checked my
> database and the
> only data other than that i manually entered is an auto-increment
> number and
> a random password, which i assume were produced when you filed in
> the form.
> There is no first name, last name, email etc which there should
> have been if
> you filled in the form.
>
> If it was working fine you would recieve an email automatically at the
> address you specified.
>
> If you have any ideas what's wrong i'd love to hear them.
>
> Steven M
> >
> >
> >
> > --
> > 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] Report Viruses

2002-12-10 Thread Peter Houchin
only 8? i came in to work this morning and had over 20 of em :( 

> -Original Message-
> From: Stephen [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 11 December 2002 12:13 PM
> To: Justin French
> Cc: PHP List
> Subject: Re: [PHP] Report Viruses
> 
> 
> Both return mailer demons... 8 more viruses just to check this 
> email. Thank
> goodness I have a virus protection program!!!
> 
> 
> - Original Message -
> From: "Justin French" <[EMAIL PROTECTED]>
> To: "Stephen" <[EMAIL PROTECTED]>; "PHP List"
> <[EMAIL PROTECTED]>
> Sent: Tuesday, December 10, 2002 7:59 PM
> Subject: Re: [PHP] Report Viruses
> 
> 
> > The postmaster@ or abuse@ address of his provider/ISP?
> >
> > Justin
> >
> >
> > on 11/12/02 9:22 AM, Stephen ([EMAIL PROTECTED]) wrote:
> >
> > > This is off topic but, where can you go to report viruses? I've been
> spammed
> > > with them a lot lately from this person and I'd like to stop him.
> > >
> > > Thanks,
> > > Stephen Craton
> > > http://www.melchior.us
> > >
> > > "What is a dreamer that cannot persevere?" -- http://www.melchior.us
> >
> > Justin French
> > 
> > http://Indent.com.au
> > Web Development &
> > Graphic Design
> > 
> >
> >
> >
> 
> 
> 
> -- 
> 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] Sendmail

2002-12-10 Thread Peter Houchin
check out sendmail.org

> -Original Message-
> From: Kris [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 11 December 2002 6:03 PM
> To: PHP List
> Subject: [PHP] Sendmail
> 
> 
> Hey Guys
> 
> I know this is off subject but you people seem to be the only 
> people on the net that know anything :)
> 
> I'm running Solaris 8 and the version of sendmail that comes with that.
> I was sending a batch of emails before with sendmail. I got an 
> error message:
> Sendmail [5899]: gBB1Eov05899: SYSERR(nobody): deliver: for k 1: 
> Not enough space
> 
> Do you know how I can get around this and make it run??
> 
> Thanks 
> 
> Kris
> 

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




RE: [PHP] Plz help to solve my problem.

2002-12-16 Thread Peter Houchin
you will need to say what drive the temp folder is on so c:\temp\ in the
php.ini

> -Original Message-
> From: Martin Towell [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 17 December 2002 4:11 PM
> To: 'Elaine Kwek'; PHP
> Subject: RE: [PHP] Plz help to solve my problem.
>
>
> From this error
>
> Warning: Failed to write session data (files). Please verify that the
> current setting of session.save_path is correct (/tmp) in Unknown
> on line 0
>
> It looks like you'll have to change php.ini to have
> session.save_path point
> to a valid path. Maybe \temp\  ?
>
> HTH
> Martin
>
> -Original Message-
> From: Elaine Kwek [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 17, 2002 4:08 PM
> To: PHP
> Subject: [PHP] Plz help to solve my problem.
>
>
> I am now trying to use php session control in my web application. i try to
> copy a coding an test it...but it come out error. i not sure how to solve
> it. Plz help me...I using Apache server.
>
> the code sample is like this:
>
> 
>   session_start();
>   session_register("sess_var");
>
>   $sess_var = "Hello world!";
>
>   echo "The content of \$sess_var is $sess_var";
>
> ?>
>
>
> And this is the result of the page:
>
> Warning: open(/tmp\sess_c0fe7c6a4524488a979e20d90b2eebb2, O_RDWR)
> failed: No
> such file or directory (2) in c:\Program Files\Apache
> Group\Apache\htdocs\Office_Management_System\tmp\page1.php on line 3
>
> The content of $sess_var is Hello world!
>
> Warning: open(/tmp\sess_c0fe7c6a4524488a979e20d90b2eebb2, O_RDWR)
> failed: No
> such file or directory (2) in Unknown on line 0
>
> Warning: Failed to write session data (files). Please verify that the
> current setting of session.save_path is correct (/tmp) in Unknown
> on line 0
>
>
> thanx to whom reply to me...
>
> Elaine Kwek
>
>
> --
> 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




RE: [PHP] URL path problems

2002-12-19 Thread Peter Houchin
if ur using apache using .htaccess in the directory .. and you can also set
it in the httpd.conf

> -Original Message-
> From: ªüYam [mailto:[EMAIL PROTECTED]]
> Sent: Friday, 20 December 2002 4:41 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] URL path problems
>
>
> Suppose my web domain is http://abc.com
> There is a administration directory in my wwwroot which is used
> to store the
> administrative control pages.
>
> However, from now on, everyone can access the administrative pages through
> the addictive path to the domain such as:
> http://abc.com/administration/xxx.php
>
> Is there any solution to block or prevent the addictive path through my
> server?
> Just like only http://abc.com is allowed to browse.
> thx a lot
>
>
>
> --
> 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] Which one to use..

2002-12-22 Thread Peter Houchin
Howdy,

in my header page that I include I have a lil script that basically welcomes
a user to the site.. I've been asked if I can only get this to show up on
the 1st page of the site ( index.php ) now rather than have a whole new
header page I want to see if i can go  something like this

if page = index.php
do this
else
do that

now to my actual question which way/function would be the better option to
use for this..

$_SERVER["REQUEST_URI"], $_SERVER["SCRIPT_NAME"] or try and do something
with $_SERVER["PHP_INFO"], or is the one that I am missing .. ?

Cheers

Peter
"the only dumb question is the one that wasn't asked"



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




RE: [PHP] php/dreamweaver mx/mysql server question...

2002-12-22 Thread Peter Houchin
localhost refferes to the actual machine your are on .. what is the remote
server's host name or ip number .. use one of them instead of local host

> -Original Message-
> From: Kelly Meeks [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, 21 December 2002 10:00 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] php/dreamweaver mx/mysql server question...
>
>
> I'm trying to get dreamweaver mx working with php/mysql and a
> remote server.
>
> My remote server is named localhost.  How can I change it's name?
>  Is it as simple as change the host value for the user's login?
> I've tried several things to no avail.
>
> TIA,
>
> Kelly
>


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




RE: [PHP] Code contents of a function

2003-01-02 Thread Peter Houchin
so put it in a if or switch statement

eg

if ($var){
 myfunction();
}
else {
 sumotherfunction();
}

etc


> -Original Message-
> From: Shawn McKenzie [mailto:[EMAIL PROTECTED]]
> Sent: Friday, 3 January 2003 12:18 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Code contents of a function
> 
> 
> I have a script with some functions and within the script I want 
> to read the
> code from one of the functions into a string.
> 
> Example:
> 
> function myfunction() {
> echo "something";
> echo "something else";
> someotherfunction();
> }
> 
> I want to read:
> 
> echo "something";
> echo "something else";
> someotherfunction();
> 
> into a string.
> 
> Any ideas??? TIA
> -Shawn
> 
> 
> 
> -- 
> 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] PHP sendmail configuration

2003-01-06 Thread Peter Houchin
richard check your php.ini & the mail stuff in there .. it's most likely
using the address either there or ur web server config file

> -Original Message-
> From: Richard Baskett [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 7 January 2003 10:49 AM
> To: PHP General
> Subject: [PHP] PHP sendmail configuration
>
>
> Ok I know it's off topic, but I've been working on this for over
> 5 hours now
> and I almost have it configured, but something is definitely wrong!
> Basically I can send email using sendmail by this command:
>
> echo "Just a test" | mail -s "test" [EMAIL PROTECTED]
>
> Now [EMAIL PROTECTED] receives the email, but the From address is
> [EMAIL PROTECTED] and I have no idea where it is getting that
> address from!  Does anyone know how I can change that from address?
>
> And what would stop the above command from delivering to certain
> valid email
> addresses?
>
> This is definitely causing problems with my php server also when trying to
> send emails...
>
> Rick
>
> "Only a life lived for others is worth living." - Albert Einstein
>
>
> --
> 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] Access page via user & password

2003-01-06 Thread Peter Houchin
yep look at sites like phpbeginner.com, phpwizard.com,zend.com,
phpbuilder.com and browse ya way thru the tutorials there are plently of
sites out there such as the ones mentioned that will give you a great
helping hand :)

> -Original Message-
> From: Ezequiel Sapoznik [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 7 January 2003 2:28 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Access page via user & password
>
>
> Hi!
>
> I am teacher on a University and I want that our page only be access by
> specific people. Anyone has or knows where to find any php to
> administrate a
> base of user and passwords (made in mysql)?
>
> Thanks in advance,
>
> Ezequiel
>
>
>
> --
> 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] Need a suggestion on developing a php-related system

2003-01-07 Thread Peter Houchin
check out php nuke or post nuke

> -Original Message-
> From: Kelvin Poon [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 8 January 2003 4:41 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Need a suggestion on developing a php-related system
>
>
>
> HI, I am new to PHP and I am just wondering if anyone could give me some
> help.
>
> I am currently working for infomart.ca, it is basically a company
> that sells
> articles (news/business).  MY employer require me to develop a
> system using
> Perl and PHP, and the assignment is as follow:
>
> To develop a system that collects, stores, processes and disseminates
> internally the updating status of our databases.
>
> We currently have over 200 databases from various daily newspapers,
> magazines, TV transcripts and other periodicals.  Most of them
> are updated
> every weekday between 4a.m. and 7a.m..  Others are updated on a weekly or
> monthly basis.  THe update schedule Tv. the actual status need to be
> captured and made available to internal staff.  This is similar to the
> flight departure/arrival information in an airport.
>
> Basically I was just wondering if anyone could give me any kind of
> suggestions.  Thanks a lot, any type of suggestions would be great!
>
> Kelvin
>
>
>
>
> _
> MSN 8: advanced junk mail protection and 2 months FREE*.
> http://join.msn.com/?page=features/junkmail
>
>
> --
> 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] Need a suggestion on developing a php-related system

2003-01-07 Thread Peter Houchin
keep to the list pls kelvin :)
 but to answer ur q.. php nuke is a new portal system... check out
http://phpnuke.org for info ( and to dl it )



> -Original Message-
> From: Kelvin Poon [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 8 January 2003 4:50 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP] Need a suggestion on developing a php-related system
>
>
>
>
>
>
> THanks a lot Peter, would you mind explaining what is PHP nuke?
>
>
> >From: "Peter Houchin" <[EMAIL PROTECTED]>
> >To: "Kelvin Poon" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
> >Subject: RE: [PHP] Need a suggestion on developing a php-related system
> >Date: Wed, 8 Jan 2003 16:57:53 +1100
> >
> >check out php nuke or post nuke
> >
> > > -Original Message-
> > > From: Kelvin Poon [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, 8 January 2003 4:41 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP] Need a suggestion on developing a php-related system
> > >
> > >
> > >
> > > HI, I am new to PHP and I am just wondering if anyone could
> give me some
> > > help.
> > >
> > > I am currently working for infomart.ca, it is basically a company
> > > that sells
> > > articles (news/business).  MY employer require me to develop a
> > > system using
> > > Perl and PHP, and the assignment is as follow:
> > >
> > > To develop a system that collects, stores, processes and disseminates
> > > internally the updating status of our databases.
> > >
> > > We currently have over 200 databases from various daily newspapers,
> > > magazines, TV transcripts and other periodicals.  Most of them
> > > are updated
> > > every weekday between 4a.m. and 7a.m..  Others are updated on
> a weekly
> >or
> > > monthly basis.  THe update schedule Tv. the actual status need to be
> > > captured and made available to internal staff.  This is similar to the
> > > flight departure/arrival information in an airport.
> > >
> > > Basically I was just wondering if anyone could give me any kind of
> > > suggestions.  Thanks a lot, any type of suggestions would be great!
> > >
> > > Kelvin
> > >
> > >
> > >
> > >
> > > _
> > > MSN 8: advanced junk mail protection and 2 months FREE*.
> > > http://join.msn.com/?page=features/junkmail
> > >
> > >
> > > --
> > > 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
>
>
> _
> MSN 8 with e-mail virus protection service: 2 months FREE*
> http://join.msn.com/?page=features/virus
>
>


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




[PHP] working with pop up windows

2003-01-21 Thread Peter Houchin
howdy all,

a page with a link to a pop up window..
when a user clicks on it a window opens with a little form on it, now what i
want to happen is when the user hits submit and it does all of it's
processing it

1) closes the popup window
2) updates the original page where the user first started either by just a
refresh or what eva.. and I can't just use meta refreash as it's only on
this instance that the page needs to be refreashed ..

TIA

Peter



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




RE: [PHP] working with pop up windows

2003-01-21 Thread Peter Houchin
ahh shoot!!!

forgot to add the values of the form once submitted go to another page
before it's ment to go back to the parent page..

-Original Message-
From: Timothy Hitchens (HiTCHO) [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 22 January 2003 11:18 AM
To: 'Peter Houchin'; 'php gen'
Subject: RE: [PHP] working with pop up windows


Post the results to the target being the parent window and have a
JavaScript self.close() call on the window on submit/click.


Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED]

> -Original Message-
> From: Peter Houchin [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 22 January 2003 11:13 AM
> To: php gen
> Subject: [PHP] working with pop up windows
>
>
> howdy all,
>
> a page with a link to a pop up window..
> when a user clicks on it a window opens with a little form on
> it, now what i want to happen is when the user hits submit
> and it does all of it's processing it
>
> 1) closes the popup window
> 2) updates the original page where the user first started
> either by just a refresh or what eva.. and I can't just use
> meta refreash as it's only on this instance that the page
> needs to be refreashed ..
>
> TIA
>
> Peter
>
>
>
> --
> 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] Can anyone help me

2003-03-27 Thread Peter Houchin
Dude have a look on the web 1000's of examples/tutorials there and also 
in it's documentation. The PHP mailing list is NOT the place to be 
asking this as setting/learning how to use OpenSSL aint related to PHP.

Cheers
Peter
Suhas Pharkute wrote:
Can anyone give me a basic tutorial for 

Secure Site Programming (OpenSSL)

Also How to create certificate on server

Suhas

__
Suhas S Pharkute.
P O Box 8551,
Pocatello, ID 83209.
1.208.221.3896
http://myweb.cableone.net/psuhas/
__



--

Peter Houchin
Sun Rentals STR Manager
Phone: 03 9869 6452
Fax:   03 9866 2511
Mobile:0438 789 220
[EMAIL PROTECTED]
http://www.sunrentals.com.au/


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


Re: [PHP] Re: Internet Explorer toolbar

2003-03-27 Thread Peter Houchin
yes there is java script

Dan wrote:
On Thu, 27 Mar 2003 12:32:06 -0800 (PST), [EMAIL PROTECTED] (Manuel
Ochoa) wrote:

Is there any way of using php to launch a new browser without the IE toolbars?


No. PHP is server side, not client side.




--

Peter Houchin
Sun Rentals STR Manager
Phone: 03 9869 6452
Fax:   03 9866 2511
Mobile:0438 789 220
[EMAIL PROTECTED]
http://www.sunrentals.com.au/


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


Re: [PHP] Ereg question

2003-03-30 Thread Peter Houchin
Beauford, Jason,

Build a bridge and get over it already sheeesh

TYVMIA
Peter


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


Re: [PHP] daylight savings time ?

2003-04-01 Thread Peter Houchin
my understanding it that PHP uses the time & date on your server ... so 
there for I'd be thinking that maybe the time &/or date on your server 
is wrong.. so update the clock on the server

Heather P wrote:
Hello.
I use a forum which has the time as the coding (D M d, Y g:i a) how do I 
add an hour for daylight savings time ? I live in the uk and the time on 
the forum is wrong. how do I change it  ? Thanks

_
Overloaded with spam? With MSN 8, you can filter it out 
http://join.msn.com/?page=features/junkmail&pgmarket=en-gb&XAPID=32&DI=1059




--

Peter Houchin
Sun Rentals STR Manager
Phone: 03 9869 6452
Fax:   03 9866 2511
Mobile:0438 789 220
[EMAIL PROTECTED]
http://www.sunrentals.com.au/


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


Re: [PHP] Making it so the .php isn't needed

2003-04-02 Thread Peter Houchin
at a guess would say have something to do with the line in ur server 
config ... eg in apache the httpd.conf file ... and where you tell it 
what to run thru the php engine

Teren Sapp wrote:
Hi, I had it setup on my server before i reloaded it, but what i need to have happen is so that when i'm passing variables to a php file, I don't have to include the .php in the link...so i can have 

http://www.my-domain.com/page1?var1=3&var2=4
instead of 
http://www.my-domain.com/page1.php?var1=3&var2=4

Anybody know how i can make this work? THanks

Teren




--

Peter Houchin
Sun Rentals STR Manager
Phone: 03 9869 6452
Fax:   03 9866 2511
Mobile:0438 789 220
[EMAIL PROTECTED]
http://www.sunrentals.com.au/


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


RE: [PHP] Need help to choose hosting!

2002-08-01 Thread Peter Houchin

>
> How do you expect to get ASP (assuming you mean microsoft's Active Server
> Pages) on a Unix box?
>
Justin,

 you can use ChilliSoft, http://www.chillisoft.com,  by Sun Microsystems
that is a ASP plugin that works with Apache as well as other browsers such
as IBM's Websphere, and many others as well

Cheers
Peter


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




RE: [PHP] Web services and PHP

2002-08-12 Thread Peter Houchin

look up .NET in the manual it will have all your answers :D

> -Original Message-
> From: Aung [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 13 August 2002 1:16 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Web services and PHP
> 
> 
> I have some web services developed with .NET and I would like to consume
> these web services from PHP.  Can someone provide me with example code?
> 
> Thanks in advance.
> Aung
> 
> 
> 
> -- 
> 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] Web services and PHP

2002-08-12 Thread Peter Houchin

here ya go

http://www.php.net/manual/en/ref.dotnet.php



> -Original Message-
> From: Aung [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 13 August 2002 1:54 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Web services and PHP
> 
> 
> I don't see any function for .NET in PHP manual. Are you refering to
> different manual?
> 
> "Peter Houchin" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > look up .NET in the manual it will have all your answers :D
> >
> > > -Original Message-
> > > From: Aung [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, 13 August 2002 1:16 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP] Web services and PHP
> > >
> > >
> > > I have some web services developed with .NET and I would like 
> to consume
> > > these web services from PHP.  Can someone provide me with 
> example code?
> > >
> > > Thanks in advance.
> > > Aung
> > >
> > >
> > >
> > > --
> > > 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




RE: [PHP] Comparing Data

2002-08-13 Thread Peter Houchin



> -Original Message-
> From: Justin [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 14 August 2002 10:52 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Comparing Data
> 
> 
> Hello all, 
> 
> I've run into a problem and there has got to be a way to do this.
> 
> I'm searching a mysql table and finding all rows that have the 
> same ID. I need to output that ID, but I only want it to print once. 
> 
> Any help would be greatly appreciated!
> Justin
> 

what about something like a simple select statement eg

SELECT * FROM table where id = $ID;


then do something like

echo $ID
echo $other values.
blah blah blah blah

with the echo in a loop so it gets all the values..

just a thought..

Cheers

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




RE: [PHP] Include/require and the HTML Code

2002-08-14 Thread Peter Houchin

Mike,

i had no problems with this..




 # Do things






 
 
 
 LogBook
 

 

 

  

 http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Php.ini on Solaris?

2002-08-14 Thread Peter Houchin

is usually in /usr/local/lib


> -Original Message-
> From: Randall Perry [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 15 August 2002 11:58 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Php.ini on Solaris?
>
>
> Just compiled Apache 1.3.26 with latest php and discovered my
> form variables
> weren't getting thru to php scripts.
>
> Looked through archives and found ref to register_globals setting in
> php.ini. Only trouble is, I can't find php.ini on my server (except in the
> php source code folder).
>
> Where should it be?
>
> --
> Randy Perry
> sysTame
> Mac Consulting/Sales
>
> phn 772.589.6449
> mobile email[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] Call to undefined function mysql_connect()

2002-08-25 Thread Peter Houchin

do a php_info() on a page and check the mysql propeties in there.. might
give you a clue..


> -Original Message-
> From: hugh danaher [mailto:[EMAIL PROTECTED]]
> Sent: Monday, 26 August 2002 1:18 PM
> To: php
> Subject: [PHP] Call to undefined function mysql_connect()
>
>
> Help!
>
> I am getting the following error message for :
>   $link=mysql_connect("localhost","$user","$pass"); // line 34
> ?>
>
> Fatal error: Call to undefined function: mysql_connect() in
> /home/www/test.somename.org/aux/db-mod.php on line 34
>
> I have used this call successfully on php v4.0.6, and am now
> trying it on a new install (which someone else did, as I haven't
> a clue in setting up a server) which is v4.1.1.  Is mysql_connect
> a defunct command, or do I need to do something to enable its use?
>
> Thanks for any help.
> Hugh
>
>
>
>
>
>
>


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




RE: [PHP] unexpected T_SL

2002-09-01 Thread Peter Houchin

simple .. look up docs on putting straight text to the screen and u'll find
a number of options such as echo and print i bet ya'd be able to solve
really quickly


> -Original Message-
> From: Voisine [mailto:[EMAIL PROTECTED]]
> Sent: Monday, 2 September 2002 12:34 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] unexpected T_SL
>
>
> Hi,
>
> What is wrong witht his code? Parse error: parse error, unexpected T_SL
> in c:\program files\easyphp\www\tutorial\eod.php on line 2
>
>  $str = << Example of string
> spanning multiple lines
> using heredoc syntax.
> EOD;
> ?>
>
> Regards!
> Joe
>
>
> --
> 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] refresh function?

2002-09-11 Thread Peter Houchin

yeah have a look at ur meta tags.. ie meta refreash

> -Original Message-
> From: Peter [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 12 September 2002 1:56 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] refresh function?
> 
> 
> Hi,
>   Is there a function that will auto refresh a page?
> 
> Thanks in advance,
> -Peter
> 
> 
> 
> -- 
> 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] adding unix account via system command

2002-09-17 Thread Peter Houchin

you need to make sure that the web has permission to use that file .. my
guess is it don't have permission hence why you can run add.sh from the
command line (where your not your web user I'm assuming).

> -Original Message-
> From: tim tom [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 18 September 2002 10:56 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] adding unix account via system command
>
>
> php4.2.3 apache mod
> linux rh7.2
> ---
>
> I am trying to add unix system account user via a simple php and
> shell script
>  system("/usr/bin/add.sh timtom752002 timtom752002
> /home/timtom752002",$r) or die (" $r user
> creation fail");
>
> print "success";
> ?>
>
> when i ran add.php on my browser, i get
>  254 user creation fail
>
> I created my add.sh file in /usr/bin and I have setuid it:
> -rwsr-xr-x1 root devel 216 Sep 18 08:54 add.sh
>
> It looks like:
> #!/bin/sh
>
> username=$1
> password=$2
> homedir=$3
> # create user
> /usr/sbin/useradd -m -d $homedir $username
>
>
> # change the password
> (
> echo $password
> sleep 1
> echo $password
> sleep 1
> echo $password
> )|passwd $username
>
> When I ran the add.sh from the command line, it works ok:
> $ /usr/bin/add.sh n n /home/n
> Changing password for user n
> passwd: all authentication tokens updated successfully
> (i tried login in with uid=n and passwd=n and it was ok)
>
> What's wrong with those scripts. It DOESN'T even create the user
> timtom752002. Please help
>
> --
> tim
>
>
> __
> Do You Yahoo!?
> Yahoo! Autos - Get free new car price quotes
> http://autos.yahoo.com
>
> --
> 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] adding unix account via system command

2002-09-17 Thread Peter Houchin

I am not sure to be totally honest ...  but i would have thought you setuid
on add.sh to allow it to add the users but i don't think it would work for
user nobody. ..what if you tried something like this

user nobody (Apache)
calls add.sh (initially started by user nobody)
add.sh changes user to say user admin
useradd runs
add.sh exits user admin
add.sh ends


either that or make sure user nobody is a member of the devel group.. but
that could lead to security issues.


> -Original Message-
> From: tim tom [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 18 September 2002 12:14 PM
> To: Peter Houchin; [EMAIL PROTECTED]
> Subject: RE: [PHP] adding unix account via system command
>
>
> Dear Pete,
> Yes, apache runs as nobody. But I have setuid add.sh. Wouldn't
> that be sufficient ?
>
> --
> tim
>
> --- Peter Houchin <[EMAIL PROTECTED]> wrote:
> > you need to make sure that the web has permission to use that file .. my
> > guess is it don't have permission hence why you can run add.sh from the
> > command line (where your not your web user I'm assuming).
> >
>
>
> __
> Do You Yahoo!?
> Yahoo! Autos - Get free new car price quotes
> http://autos.yahoo.com
>


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




RE: [PHP] Access > MySQL

2002-09-19 Thread Peter Houchin

yeah there is tis called

Access-to-MySQL (http://www.convert-in.com/acc2sql.htm ) ...here's some
specs on it

Features

All MS Access data types and attributes are supported
Works with all versions of Unix and Windows MySQL servers
Stores MS Access database into a dump file (see Customize Conversion
article for related information)
Special approach for VServer users (see VServer User Notes article for
related information.)
Converts indexes with all necessary attributes

Converts password protected MS Access databases
Easy-to-use wizard-style interface
Full install/uninstall support

Requirements

Windows 95 or later or Windows NT 3.51 or later
At least 32 MB of available memory
MS Access 7.0 or higher (ODBC is not required)
Necessary privileges to write into database on the target MySQL server

Limitations

Converts MS Access tables only (forms, queries, reports are not supported)
Does not convert system (hidden) tables
Does not convert relationships between tables
Does not convert databases protected with User-Level security


> -Original Message-
> From: Liam MacKenzie [mailto:[EMAIL PROTECTED]]
> Sent: Friday, 20 September 2002 12:07 PM
> To: php
> Subject: [PHP] Access > MySQL
>
>
> Yeah, I know this doesn't have much to do with PHP...
>
> does anyone know of a tool that automatically converts an access
> database to
> MySQL readable data?
>
>
> Thanks a heap!
> Liam
>
>
>
>
> --
> 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] backup script

2002-09-23 Thread Peter Houchin

do ya self a fav. and look @ phpbuilder, phpwizard etc and and a look will
take ya 2 mins to find what your looking for :)

> -Original Message-
> From: Research and Development [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 24 September 2002 9:18 AM
> To: PHP General List
> Subject: [PHP] backup script
>
>
> Hello. Can someone point me to an example of a script that backs up de
> database and the web directory and its files?
>
> Thanks in advance.
>
>
> --
> 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] Maybe a stupid question but can it be done?

2002-09-23 Thread Peter Houchin

if the 2 tables have the same name can't he just go

INSERT INTO table1, table2 (table1.name=$name, table2.name=$name ... blah);

think u can do that .. but again that relies on table names being the same i
guess...

> -Original Message-
> From: John Holmes [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 24 September 2002 12:21 PM
> To: 'Chuck "PUP" Payne'; 'PHP General'
> Subject: RE: [PHP] Maybe a stupid question but can it be done?
>
>
> Just run two inserts. You can't do it with just one.
>
> I'd have to guess you have design issues if you have to do this
> anyhow...
>
> ---John Holmes...
>
> > -Original Message-
> > From: Chuck "PUP" Payne [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, September 23, 2002 9:45 PM
> > To: PHP General
> > Subject: [PHP] Maybe a stupid question but can it be done?
> >
> > Ok, Let's try this again, for some reason this didn't post from early
> > today.
> >
> > I have db that has two tables that I am needing to post the same
> > information
> > into both tables, I can't use ID. So I am want to see if there is a
> sql
> > statement that will let me or how I can do with a php page.
> >
> > I am sorry to ask, I have looked around to see if there any on the net
> or
> > in
> > my mysql and php books but this seems like a weird task.
> >
> > Chuck Payne
> > Magi Design and Support
> >
> >
> > --
> > 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




RE: [PHP] Maybe a stupid question but can it be done?

2002-09-23 Thread Peter Houchin


opps same fields even sawwy :)
> -Original Message-
> From: Peter Houchin [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 24 September 2002 1:49 PM
> To: 'PHP General'
> Subject: RE: [PHP] Maybe a stupid question but can it be done?
>
>
> if the 2 tables have the same name can't he just go
>
> INSERT INTO table1, table2 (table1.name=$name, table2.name=$name
> ... blah);
>
> think u can do that .. but again that relies on table names being
> the same i
> guess...
>
> > -Original Message-
> > From: John Holmes [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, 24 September 2002 12:21 PM
> > To: 'Chuck "PUP" Payne'; 'PHP General'
> > Subject: RE: [PHP] Maybe a stupid question but can it be done?
> >
> >
> > Just run two inserts. You can't do it with just one.
> >
> > I'd have to guess you have design issues if you have to do this
> > anyhow...
> >
> > ---John Holmes...
> >
> > > -Original Message-
> > > From: Chuck "PUP" Payne [mailto:[EMAIL PROTECTED]]
> > > Sent: Monday, September 23, 2002 9:45 PM
> > > To: PHP General
> > > Subject: [PHP] Maybe a stupid question but can it be done?
> > >
> > > Ok, Let's try this again, for some reason this didn't post from early
> > > today.
> > >
> > > I have db that has two tables that I am needing to post the same
> > > information
> > > into both tables, I can't use ID. So I am want to see if there is a
> > sql
> > > statement that will let me or how I can do with a php page.
> > >
> > > I am sorry to ask, I have looked around to see if there any on the net
> > or
> > > in
> > > my mysql and php books but this seems like a weird task.
> > >
> > > Chuck Payne
> > > Magi Design and Support
> > >
> > >
> > > --
> > > 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




RE: [PHP] .php to .html?

2002-09-29 Thread Peter Houchin

just save the files u create as .html make sure in your apache httpd.conf
where you reference for .php that u have html in here as well and all will
be sweet.

eg in this line

AddType application/x-httpd-php .php4 .php .htm .php3 .html


anything you put in that line will be passed through php

cheers


> -Original Message-
> From: Jean-Christian Imbeault [mailto:[EMAIL PROTECTED]]
> Sent: Monday, 30 September 2002 3:46 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] .php to .html?
>
>
> I am using PHP 4.2.3 and Apache 1.3.26
>
> When a user comes to one of my php pages it comes out has
> http:..ip/page.php
>
> How can I make my pages come out as .html instead of .php?
>
> Thanks!
>
> Jc
>
>
> --
> 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] Configure php for windows

2002-09-30 Thread Peter Houchin

  ScriptAlias /php/ "c:/path-to-php-dir/"

one would assume that you change the "C:/path-to-php-dir/" to the path of
the cd drive to get it to work


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




RE: [PHP] PHP and Flash

2002-10-01 Thread Peter Houchin


do you mean load into the menu as in populate the menu? if so then that is
working but if u mean u click on a link then nothing comes up


> -Original Message-
> From: Rebekah Garner [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 2 October 2002 2:15 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] PHP and Flash
>
>
> Okay, this may be a bit off topic, BUT we just finished a website
> using PHP, MySql and Flashwell, I need someone...anyone to
> check out this URL for me and click on the Stallions menu, and
> tell me if anything loads into the text field.  The client swears
> that it isn't, but it is dammit. Or is it?
>
> http://www.overbrookfarm.myiglou.com/
>
> Rebekah Garner
>


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




RE: [PHP] PHP and Flash

2002-10-01 Thread Peter Houchin

am assuming tis up  the top ( it loads other menu names) and the white space
down the bottom. but either way it don't

> -Original Message-
> From: Justin French [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 2 October 2002 2:29 PM
> To: Rebekah Garner; [EMAIL PROTECTED]
> Subject: Re: [PHP] PHP and Flash
>
>
> What f'n text field?
>
> Justin
>
>
> on 02/10/02 2:15 PM, Rebekah Garner ([EMAIL PROTECTED]) wrote:
>
> > Okay, this may be a bit off topic, BUT we just finished a
> website using PHP,
> > MySql and Flashwell, I need someone...anyone to check out
> this URL for me
> > and click on the Stallions menu, and tell me if anything loads
> into the text
> > field.  The client swears that it isn't, but it is dammit. Or is it?
> >
> > http://www.overbrookfarm.myiglou.com/
> >
> > Rebekah Garner
> >
>
>
> --
> 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] session.cookie_domain

2002-10-06 Thread Peter Houchin

howdy,

I have a server running a number of domains  as virtual hosts under apache
if i wanted to set a cookie domain can i set it for all domains in php.ini?
or is it better to set it using ini_set(session.cookie_domain, domain) in
each site?

Cheers

Peter
"the only dumb question is the one that wasn't asked"



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




RE: [PHP] File download doesn't work with SSL

2002-10-07 Thread Peter Houchin

> > You can have multiple directives in that header:
> >
> > Cache-Control: no-cache, no-store
> >
> > Do you have a way to view the HTTP?
>
> No. Can you recommend a good method on windows? Should I get lynx or
> does opera have a method to view all the headers?

can't you view all headers etc in the source of the pages? pretty sure can
view all headers sent to the browser in both ie and NN...


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




[PHP] updated tutorials? do they exist?

2002-10-08 Thread Peter Houchin

Howdy

does any one know of any site(s) any where that has UPDATED tutorials? I
have alooked @ phpbuilder, phpwizard, hotscripts, php.resourceindex.com,
zend for updated examples etc.. but they only seem to have them for earlier
versions of php and not for any verson after php 4.2.1?

Cheers

Peter
"the only dumb question is the one that wasn't asked"



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




[PHP] sesson tutorials

2002-10-13 Thread Peter Houchin

howdy

does any one know where i can view an uptodate session tutorial? so far I
have not found any that are up todate.

Cheers

Peter
"the only dumb question is the one that wasn't asked"



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




RE: [PHP] sesson tutorials

2002-10-13 Thread Peter Houchin

Thanks to John Holmes & Timothy Hitchens for your help

after looking at what both of you said .. i found i had handled the sessions
correctly but not the sql statement in my script and it was the sql out put
that was causing nothing to be registered in my sessions.


Cheers
Peter

> -Original Message-
> From: John W. Holmes [mailto:[EMAIL PROTECTED]]
> Sent: Monday, 14 October 2002 12:50 PM
> To: 'Peter Houchin'; 'php_gen'
> Subject: RE: [PHP] sesson tutorials
>
>
> > howdy
> >
> > does any one know where i can view an uptodate session tutorial? so
> far I
> > have not found any that are up todate.
>
> Sessions are a breeze. Just call session_start() on any page you need to
> access the session. You then have a variable called $_SESSION, which is
> an array. You can use it as any other array. To save the value "John" to
> the session as a "Name", you'd use
>
> $_SESSION['name'] = 'John';
>
> Now, any page you have session_start() on will have the variable
> $_SESSION['name'] available to it.
>
> That's the whole tutorial Use $_SESSION as you would any other variable
> and it'll be available to any page that has session_start on it.
>
> ---John Holmes...
>
>
>
>


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




[PHP] passing mysql_error() out put to a different page?

2002-10-14 Thread Peter Houchin

howdy,

I have a page that I want to control the errors etc for a site, now what I
want is to perform a query on one page but if there's an error it opens a
different page with the error message on it including the out put from
mysql_error() can this be done?

Cheers

Peter
"the only dumb question is the one that wasn't asked"



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




RE: [PHP] Re: two submit buttons redirecting to two scripts

2002-10-14 Thread Peter Houchin

make sure there is nothing before the if statements
for example


etc


and that should work fine regardless if your using the Header( Location...)
other means

> -Original Message-
> From: Sonal Patel [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 15 October 2002 8:06 AM
> To: Anup
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Re: two submit buttons redirecting to two scripts
>
>
> sorry, earlier I did not send the message to the group.
>
> Anup, I tried your solution which works exactly same as mine,
> and it also gives me error when I try to redirect.
> As far as echoing which button was selected --it was fine and both
> scripts work same.
> But redirect does not work.
>
> here is the error message,
> Warning: Cannot add header information - headers already sent by
> (output started at /home3/www/antriksh/resources/action2.php:5) in
> /home3/www/antriksh/resources/action2.php on line 13
>
> any help?
>
>
>
> On Monday, October 14, 2002, at 05:49 PM, Anup wrote:
>
> > you have this:
> > 
> >
> > 
> >
> > change the name of the buttons to b1 and b2, respectively, and give
> > them
> > some non-null value (as you have it)
> > Then in action.php you will have the following code:
> > if ($b1) {
> > redirct to script1
> > }
> > elseif ($b2) {
> > redirct to script2
> > }
> >
> > /*Either b1 OR b2 will have a value, not both, and use header() to
> > redirect
> > the sctipt*/
> >
> >
> >
> >
> > "Sonal Patel" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >> Hello,
> >>
> >> I am very new to this group.
> >>
> >> I have a very simple question.
> >> Please look at this form,
> >> http://antriksh.com/resources/2_submit_button_form.shtml
> >>
> >> here I want to change the echo statement in the script "action.php" to
> >> redirect it to another script.
> >>
> >> ie, I want to change the form action dynamically.  How can I modify
> >> this form to do so?
> >>
> >> I tried few PHP tricks that did not work for me.  So I am asking this
> >> questions to anyone who may be able to help.
> >>
> >> Thank you ,
> >> Sonal
> >>
> >
> >
> >
> > --
> > 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] passing mysql_error() out put to a different page?

2002-10-14 Thread Peter Houchin

i have tried this .. but am getting errors at the moment .. (the sql error
is deliberate)

function new_user() {

   $res = mysql_query("INSERT INTO users WHERE uname='$_POST[uname]' ,
passwd='$_POST[pass]', firstname='$_POST[firstname]',
lastname='$_POST[lastname]', email='$_POST[email]' ")

// pass error onto logerror page

or die (' \">' Header("Location:
logerror.php?op=insert_error"));

// insert into db worked  redirect
Header("Location: index.php");
}

but so far it's not likeing the Header inside the die that's fair enough I
can figure out why.. but other wise i can't figure out how to pass the die
value through if i make the error redirect  out side the die and have it in
a if statement or the like...

> -Original Message-
> From: Brad Bonkoski [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 15 October 2002 11:07 AM
> To: Peter Houchin
> Cc: php_gen
> Subject: Re: [PHP] passing mysql_error() out put to a different page?
>
>
> Very interesting question
>
> The only thing I can come up with right now is if you detect an error
> (one of the functions returning FALSE,)
> you can write the contents of mysql_error() to a file log and display that
> file on another page?  Or pass the output of that (mysql_error()) as an
> HTTP/form variable to another page?
> ...spark any additional ideas??
> -Brad
>
> Peter Houchin wrote:
>
> > howdy,
> >
> > I have a page that I want to control the errors etc for a site,
> now what I
> > want is to perform a query on one page but if there's an error
> it opens a
> > different page with the error message on it including the out put from
> > mysql_error() can this be done?
> >
> > Cheers
> >
> > Peter
> > "the only dumb question is the one that wasn't asked"
> >
> > --
> > 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] passing mysql_error() out put to a different page?

2002-10-14 Thread Peter Houchin

I think that should work but for some reason nothing is getting written into
the session

function new_user() {

   $res = mysql_query("INSERT INTO users WHERE uname='$_POST[uname]' ,
passwd='$_POST[pass]', firstname='$_POST[firstname]',
lastname='$_POST[lastname]', email='$_POST[email]',
company='$_POST[company]'")
//I get out put here in mysql_error() when uncommented
//or die (mysql_error());

//no output from mysql_error() in $_SESSION['mysqlerror'] when i call
$_SESSION['mysqlerror'] but does take the redirect

or die ($_SESSION['mysqlerror'] = mysql_error() && Header("Location:
logerror.php?op=insert_error"));

Header("Location: index.php");
}

here is the code am calling it with :

function insert_error()
{
echo "  There was an error
";
echo $_SESSION['mysqlerror'];
echo "";
 }

I have tripple checked that both pages have the session_start() on them
before any function is started.

any idea's?

> -Original Message-
> From: John W. Holmes [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 15 October 2002 11:21 AM
> To: 'Peter Houchin'; 'Brad Bonkoski'
> Cc: 'php_gen'
> Subject: RE: [PHP] passing mysql_error() out put to a different page?
>
>
> Maybe you should just save the error message into a cookie or session
> and then use header() to redirect to the error page.
>
> ---John Holmes...
>
> > -Original Message-
> > From: Peter Houchin [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, October 14, 2002 9:22 PM
> > To: Brad Bonkoski
> > Cc: php_gen
> > Subject: RE: [PHP] passing mysql_error() out put to a different page?
> >
> > i have tried this .. but am getting errors at the moment .. (the sql
> error
> > is deliberate)
> >
> > can figure out why.. but other wise i can't figure out how to pass the
> die
> > value through if i make the error redirect  out side the die and have
> it
> >
>


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




RE: [PHP] passing mysql_error() out put to a different page?

2002-10-15 Thread Peter Houchin

Just wanted to say thanks to both Brad and John for their help i got it
going with the following


function new_user() {

   $res = mysql_query("...");
if ($res == FALSE)
{
$error = mysql_error();
$_SESSION['mysqlerror'] = $error;
Header("Location: logerror.php?op=insert_error");
}
else {

}
}

for some reason it didn't like to put the out put of mysql_error into a
session var but as soon as I changed it to a "normal" var it works great

thanks again for you help on this :)

Cheers
Peter


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




[PHP] to use switch or not to use switch

2002-10-16 Thread Peter Houchin

howdy

am just courious to see what approach others would take given this senario.

I have a form which for the most part is basic to follow but I have one
field where people can enter any value up to 100k in  now what has to happen
is if they enter anything that equals 20k or lower is taken care of by one
script, if it is greater than 20k but less than or equal to 50k it is
handled by another script and if it is greater than 50k but equal to or
lower than 100k by another script and if it's greater than 100k another
script is run.

if any one has any suggestions on different approaches to this i'd like to
hear it as I am looking for something relitively easy to code and and easy
for some one else to come in and change things if required down the track.

Cheers

Peter
"the only dumb question is the one that wasn't asked"



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




[PHP] why can't i do this?

2002-10-16 Thread Peter Houchin

howdy 

can some one please tell me why i can't do this

elseif ($_POST['cost'] <=4 && >=20001){...}

but i can do this 

elseif ($_POST['cost'] <=4 && $_POST['cost'] >=20001){...}



Cheers 

Peter 
"the only dumb question is the one that wasn't asked" 
 

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




RE: [PHP] why can't i do this?

2002-10-16 Thread Peter Houchin

ok thanks  just would have thought it would have known  to compare it
with out it having to be there first ... as in

if $_POST['cost'] is <=4 AND >=21

but i'll live with the fact it doesn't read it like i do :)

Cheers

> -Original Message-
> From: Keith Vance [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 17 October 2002 2:12 PM
> To: Peter Houchin
> Cc: php_gen
> Subject: Re: [PHP] why can't i do this?
>
>
> Because that's not the way PHP works. You aren't comparing anything on the
> second half of the elseif statement.
>
> Keith Vance
> Vance Consulting LLC
> www.vanceconsulting.net
> (206) 355-2399
>
> Try U.M.A. at http://uma.sourceforge.net/
>
>
> On Thu, 17 Oct 2002, Peter Houchin wrote:
>
> > howdy
> >
> > can some one please tell me why i can't do this
> >
> > elseif ($_POST['cost'] <=4 && >=20001){...}
> >
> > but i can do this
> >
> > elseif ($_POST['cost'] <=4 && $_POST['cost'] >=20001){...}
> >
> >
> >
> > Cheers
> >
> > Peter
> > "the only dumb question is the one that wasn't asked"
> >
> >
> > --
> > 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] why can't i do this?

2002-10-16 Thread Peter Houchin

opps that should read
if $_POST['cost'] is <=4 AND it is >=21 then ...

> 
> ok thanks  just would have thought it would have known  to compare it
> with out it having to be there first ... as in
> 
> if $_POST['cost'] is <=4 AND >=21
> 
> but i'll live with the fact it doesn't read it like i do :)
> 
> Cheers
> 
> > -Original Message-
> > From: Keith Vance [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, 17 October 2002 2:12 PM
> > To: Peter Houchin
> > Cc: php_gen
> > Subject: Re: [PHP] why can't i do this?
> >
> >
> > Because that's not the way PHP works. You aren't comparing 
> anything on the
> > second half of the elseif statement.
> >
> > Keith Vance
> > Vance Consulting LLC
> > www.vanceconsulting.net
> > (206) 355-2399
> >
> > Try U.M.A. at http://uma.sourceforge.net/
> >
> >
> > On Thu, 17 Oct 2002, Peter Houchin wrote:
> >
> > > howdy
> > >
> > > can some one please tell me why i can't do this
> > >
> > > elseif ($_POST['cost'] <=4 && >=20001){...}
> > >
> > > but i can do this
> > >
> > > elseif ($_POST['cost'] <=4 && $_POST['cost'] >=20001){...}
> > >
> > >
> > >
> > > Cheers
> > >
> > > Peter
> > > "the only dumb question is the one that wasn't asked"
> > >
> > >
> > > --
> > > 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




RE: [PHP] Sessions help please

2002-10-24 Thread Peter Houchin
Have a look through the articles and or tutorials that can be found on
phpbeginner.com and also phpbuilder.com they will give u a good place to
start learning about it all :)

> -Original Message-
> From: Bryan McLemore [mailto:Kaelten@;worldnet.att.net]
> Sent: Friday, 25 October 2002 2:19 AM
> To: PHP - General
> Subject: [PHP] Sessions help please
>
>
> Hi guys I'm a little confused on how sessions work.  ok I  use
> session_start(); to get started I know that but then the manual
> starts to confuse me with all of the garbled text about passing
> the SID.  How do I tell if it was compiled with transparent SID passing?
>
> Also I'm not sure how to use cookies and this is just a small
> application for private use so I don't mind passing it using urls
> for this iteration of the project.
>
> Also I'm not quite sure how to auctually perserve the variables
> across pages.
>
> Thanks,
> Bryan
>


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




RE: [PHP] Session Trouble

2002-10-24 Thread Peter Houchin
> I'm trying to register a session for a poll by first opening the
> session (session_start()), then registering it like this:
>
> $_SESSION['voted'] = "yes";
>
> Problem is, when I check to see if the session is there:
>
> if(isset($_SESSION['voted']))
>
> I have it load up a page containing the poll results:
>
> include("poll_voted.php"); } ?>
>
> But it doesn't display it. It displays the default (which is the
> voting part). Any ideas why?

Stephen

i have this sort of thing in my site .. what I suggest (and this works for
me no problems) is


I prefer to do it that way than to use includes, also you will have to make
sure this is at the very top of the page before any html tags etc are set.

Cheers
Peter


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




RE: [PHP] Sessions help Please

2002-10-24 Thread Peter Houchin
have a look on phpbeginner there is a couple of articles/tutorials that
explain this also look at previous posts :)

> -Original Message-
> From: Bryan McLemore [mailto:Kaelten@;worldnet.att.net]
> Sent: Friday, 25 October 2002 6:39 AM
> To: PHP - General
> Subject: [PHP] Sessions help Please
>
>
> Hi guys I'm a little confused on how sessions work.  ok I  use
> session_start(); to get started I know that but then the manual
> starts to confuse me with all of the garbled text about passing
> the SID.  How do I tell if it was compiled with transparent SID passing?
>
> Also I'm not sure how to use cookies and this is just a small
> application for private use so I don't mind passing it using urls
> for this iteration of the project.
>
> Also I'm not quite sure how to auctually perserve the variables
> across pages.
>
> Thanks,
> Bryan
>
>


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




[PHP] OCDB Connection from unix box

2002-10-27 Thread Peter Houchin
can any one point me to a good tutorial or article that has web server on a
unix box and a win2k server with access on it? is there anything other than
the ocdb_connect... that i need to get/use to connect to it?

Cheers

Peter
"the only dumb question is the one that wasn't asked"



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




RE: [PHP] OCDB Connection from unix box

2002-10-27 Thread Peter Houchin
Thanks Andrew :D

> -Original Message-
> From: Andrew Hill [mailto:ahill@;openlinksw.com]
> Sent: Monday, 28 October 2002 12:10 PM
> To: Peter Houchin
> Cc: php_gen
> Subject: Re: [PHP] OCDB Connection from unix box
> 
> 
> Hi Peter,
> 
> Check out the PHP-ODBC HOWTO's on http://www.iodbc.org, this will help 
> you get the *nix side set up.
> You will also need an appropriate driver to install on the *nix box - 
> OpenLink has 30 day trials if you require one.
> 
> Best regards,
> Andrew Hill
> Director of Technology Evangelism - OpenLink Software
> Universal Data Access and the Virtuoso Universal Server
> http://www.openlinksw.com/virtuoso/whatis.htm
> 
> On Sunday, October 27, 2002, at 07:56 PM, Peter Houchin wrote:
> 
> > can any one point me to a good tutorial or article that has web server 
> > on a
> > unix box and a win2k server with access on it? is there anything other 
> > than
> > the ocdb_connect... that i need to get/use to connect to it?
> >
> > Cheers
> >
> > Peter
> > "the only dumb question is the one that wasn't asked"
> >
> >
> >
> > -- 
> > 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] A newbie on Board!

2002-10-27 Thread Peter Houchin
jump along to php.net/manual/en and have a look in there and it will show ya
how to connect to oracle ( I can't remember :D ) also check out
phpbuilder.com and phpbeginner.com they'll both have tutorials for
connecting to oracle from memory :)

Cheers

> -Original Message-
> From: Subodh Gupta [mailto:Subodh.Gupta@;seepz.tcs.co.in]
> Sent: Monday, 28 October 2002 5:18 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] A newbie on Board!
>
>
> Hi,
>
> I have just started off myself to learn PHP.  I have installed PHP 4.2.3
> and Apache 1.3.27.  I have built some sample pages which are running
> fine.   But now I want to integrate PHP with Oracle.  Can somebody help me
> how to do it ?
>
> Subodh Gupta
>
>
>
>
> --
> 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] newbie: apache prob...

2002-10-28 Thread Peter Houchin
check your permissions on htdocs etc and also that u haven't blocked ya self
outta there in the httpd.conf

> -Original Message-
> From: John Nichel [mailto:jnichel@;by-tor.com]
> Sent: Tuesday, 29 October 2002 8:09 AM
> To: Mr. BuNgL3
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] newbie: apache prob...
>
>
> Even though this should go to an apache list
>
> Do you have an "index.html" (or .php or whatever you have it set to
> reconize in the httpd.conf) file in the document root directory?
>
> Mr. BuNgL3 wrote:
> > Hi...
> > I have a little problem... when i do //localhost/ on the
> browser i don't get
> > nothing it gives me "Forbidden - u don't have permission to
> access"... but i
> > was the one that installed the apache server!! do u know what's
> the problem?
> > Thanks
> >
> >
> >
>
>
>
> --
> 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] New Error?

2002-10-28 Thread Peter Houchin
instead of using break use exit() where u have ur breaks and will work fine

> -Original Message-
> From: Marek Kilimajer [mailto:kilimajer@;webglobe.sk]
> Sent: Tuesday, 29 October 2002 1:30 AM
> To: PHP
> Subject: Re: [PHP] New Error?
> 
> 
> Break an continue are for loops (while,for ...), if you want to get out 
> of a function, use return
> 
> Steve Jackson wrote:
> 
> >I get this error from my code.
> >Fatal error: Cannot break/continue 1 levels in
> >/www/u1255/shop/purchase.php on line 22
> >
> >I think I need to end the functions if a condition is met so is there a
> >way to do it without breaking?
> >Where do I go from here?
> > 
> > > 
> >  include ('products_sc_fns.php');
> >  // The shopping cart needs sessions, so start one
> >  session_start();
> > 
> >  do_html_header("Checkout");
> >  // if filled out
> >  //echo "testing";
> >  if($cart&&$name&&$address&&$city&&$zip&&$country)
> >  
> >  {
> >// able to insert into database
> >if( insert_order($HTTP_POST_VARS)!=false )
> >{
> >  //display cart, not allowing changes and without pictures 
> >  display_cart($cart, false, 0);
> >   calculate_weight($cart);
> >   //determine what shipping we are using
> >   if ($country!="Finland"){
> >   display_shipping(calculate_nonfinland_cost($country));
> >   break;
> >}
> >elseif ($country=="Finland" && $express=="no"){
> >   display_shipping(calculate_shipping_cost($weight));
> >   break;
> >}
> >   elseif ($country=="Finland" && $express=="yes"){
> >   display_shipping(calculate_express_cost($express));
> >   break;
> >   }
> >   
> >   //de-bug
> >   echo "test & $country & $express";
> >   //if($country!="Finland")
> >   //display_shipping(calculate_shipping_cost($weight));
> >   //{
> >   //display_shipping(calculate_nonfinland_cost($country));
> >   //}
> >   //display_shipping(calculate_express_cost($express));
> >   //display_shipping(calculate_temp_shipping_cost($weight)); 
> >  //get credit card details
> >   calculate_final_cost($total_price, $shipping);
> >   get_order_id();
> >   display_card_form($name, $final_cost);
> >echo " >background='images/shopbg.gif'> ";
> >   echo "";
> >  display_button("show_cart.php", "continue-shopping", "Continue
> >Shopping");  
> >echo "";
> >}
> >else
> >{
> >   echo mysql_error();
> >echo " >background='images/shopbg.gif'> Could
> >not store data, please try again.";
> >   echo " ";
> >   display_button("checkout.php", "back", "Back");
> >echo "";
> >}
> >  }
> >  else
> >  {
> >echo " >background='images/shopbg.gif'> You
> >did not fill in all the fields, please try again.";
> >echo " ";
> > display_button("checkout.php", "back", "Back");
> > echo "";
> >  } 
> > 
> >  do_html_footer();
> >?>
> >
> > 
> >
> >Steve Jackson
> >Web Developer
> >Viola Systems Ltd.
> >http://www.violasystems.com  
> >[EMAIL PROTECTED]
> >Mobile +358 50 343 5159
> >
> >
> >
> > 
> >
> >  
> >
> 
> 
> -- 
> 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] looking for Powerfull Document Management Systems in PHP...

2002-10-28 Thread Peter Houchin
yeah 

phpnuke, phpnuke.org
postnuke, postnuke.com
phpwebsite, phpwebsite.appstate.edu

there's probably a few more out there too

> -Original Message-
> From: PHP Beginner [mailto:bphpdev@;icem.cu]
> Sent: Tuesday, 29 October 2002 11:14 AM
> To: php - List
> Subject: [PHP] looking for Powerfull Document Management Systems in
> PHP...
> 
> 
> Hi guys,
> 
> I wonder if anyone of you know about any PHP system (free or Open 
> Source, etc.) that can offer the features (or similar ones) one 
> can enjoy from Microsoft SharePoint Technologies.
> 
> tanks in advance, 
> Rub.
> 

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




[PHP] geting date after x number of days

2002-10-30 Thread Peter Houchin
howdy,

I was wondering if someone could point me to a place where i can find out
how to or give me some pointers on  getting the day & date after x number of
days.. I'm also using getting the current date by

$date = date("D M d, Y ");

TIA

Cheers

Peter
"the only dumb question is the one that wasn't asked"



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




RE: [PHP] Re: Yet another question

2002-10-30 Thread Peter Houchin
try it and see .. though I am pretty sure that it won't work  unless you
define the variable else where in the file b4 calling it. other wise the
variable will either be blank or give you an error saying undefined variable
if it's used before the include.

> -Original Message-
> From: Trasca Ion-Catalin [mailto:tic2000@;home.ro]
> Sent: Thursday, 31 October 2002 10:56 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Re: Yet another question
>
>
> Yes, this works, but only if I include the file before the use of the
> variable, but, what if I use the include() after the use of the variable?
>
> --
> Trasca Ion-Catalin
> "Tjoumaidis" <[EMAIL PROTECTED]> wrote in message
> news:3DBF8DE6.70701@;freemail.gr...
> > Yes if you include the file
> >
> > include ("file");
> >
> > then you can refer to any of the variables the file contains
> >
> >
> > Trasca Ion-Catalin wrote:
> > > It's posible to call a variable from another file?
> > >
> > > --
> > > Trasca Ion-Catalin
> > >
> > >
> >
> >
>
>
>
> --
> 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] geting date after x number of days

2002-10-30 Thread Peter Houchin
apologies to all 4 my laziness, I should have looked around 1st. I'm still
1/2 asleep .. but that's no excuse.. so sorry all :)


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




[PHP] stupid me!!

2002-10-30 Thread Peter Houchin
howdy,

can any one tell me what's wrong with this my mind is going a miss on me..

if ( $state == 'NSW' &&  $state == "QLD" && $state == "NT" &&  $state ==
"ACT"){
do sum stuff
}
else {
do other stuff
}

TIA


Peter
"the only dumb question is the one that wasn't asked"



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




RE: [PHP] stupid me!!

2002-10-30 Thread Peter Houchin
thanks every one for your help.

> -Original Message-
> From: Leif K-Brooks [mailto:eurleif@;buyer-brokerage.com]
> Sent: Thursday, 31 October 2002 2:26 PM
> To: Peter Houchin
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] stupid me!!
> 
> 
> A variable can't have 4 values at once? :)
> 
> Peter Houchin wrote:
> 
> >howdy,
> >
> >can any one tell me what's wrong with this my mind is going a 
> miss on me..
> >
> >if ( $state == 'NSW' &&  $state == "QLD" && $state == "NT" &&  $state ==
> >"ACT"){
> >do sum stuff
> >}
> >else {
> >do other stuff
> >}
> >
> >TIA
> >
> >
> >Peter
> >"the only dumb question is the one that wasn't asked"
> >
> >
> >
> >  
> >
> 
> -- 
> The above message is encrypted with double rot13 encoding.  Any 
> unauthorized attempt to decrypt it will be prosecuted to the full 
> extent of the law.
> 
> 
> 
> 

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




[PHP] a conditionial insert

2002-11-18 Thread Peter Houchin
howdy have made up a script to insert stuff into my db but  I want it to be
conditionial as in I only want it inserterd if it matches the condition..

function new_user() {
//check to see if the company is in the list


  $result = mysql_query("SELECT * FROM resellers WHERE
company='$_POST[company]'");
// if it's not then ...
if ($result == FALSE){
blah
}
//if it is then insert the rest of the stuff to the db
else {
$res = mysql_query(INSERT)
}

but doing it this way doesn't seem to help.. any one got any idea's?

I've had a look around and haven't been able to see a example like this...

Cheers

Peter
"the only dumb question is the one that wasn't asked"



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




RE: [PHP] a conditionial insert

2002-11-18 Thread Peter Houchin

Hi

just wanted to say thanks Justin.. I've got it working with your idea  I
needed to change this line

if($result && mysql_num_rows($result) > 0)

to

if ($result && mysql_num_rows($result) < 1)

and it works a treat.

Thanks

Peter

> I'm no expert, but I think $result will return true if the query was
> successful, it's not dependant on if there were rows returned.
>
> To check if there was a row returned, use mysql_num_rows($result)
>
>
> $result = mysql_query("SELECT * FROM resellers WHERE
> company='$_POST[company]'");
> if($result && mysql_num_rows($result) > 0)
> {
> // insert
> }
> else
> {
> //something else
> }
>
>
>
> Justin French
> 
> http://Indent.com.au
> Web Developent &
> Graphic Design
> 
>
>


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




RE: [PHP] RE: running php as cgi script

2002-11-18 Thread Peter Houchin
Hi
> I'm trying to run a simple test php script as a cgi script on my ISP's
> server 
> and haven't been able to get it to work, although according them it is 
> possible.
> 
> I have an example from a book  which gives the following steps:
> 
> 1. Put the script in the cgi-bin
> 2. run chmod 755
> 3. include "#!/usr/bin/php" at the top. (I have checked that this is the
> 
> correct location of php on the server)
> 
> The test script they give looks like this:
> 
> #!/usr/bin/php
> 
> echo "This is a small CGI program."
> 
add a ; to the end of the line above so it looks like this 
echo "This is a small CGI program.";

> Doesn't look like the usual php syntax to me, but I guess this is
> different.
> Anyway I've tried it a bunch of different ways and it hasn't worked and
> I 
> haven't been able to find much on the subject from Google. 
> Can someone tell me where I'm going wrong?
What error messages are you getting, if any ??

Cheers
Peter

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




RE: [PHP] Variable passing through a form

2002-11-20 Thread Peter Houchin
at a guess would say have some hidden inputs on your form that echo the
var's pass from part 2 that way when your form is submitted in part 3 it
gets sent along with the new stuff

> -Original Message-
> From: Michael Benbow [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 21 November 2002 2:24 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Variable passing through a form
>
>
>
> Hi,
>
> I currently have a page divided into three areas, two of which
> are iframes.
>
> The user selects a component out of part 1, which decides what is shown
> in part 2.  When something is clicked in part 2 the information updates
> in the second iframe, or part 3.  This is all working fine through
> $PHP_SELF and target.
>
> I am now working in part 3 of my page which has already had variables
> passed to it from part 2, however when I try to make selections on this
> page which should update in the same area ($PHP_SELF) I am losing all
> the variables which were earlier passed.  I have tried $REQUEST_URI also
> which didn't help.
>
> example:
>
> after coming from part 2 $REQUEST_URI might be
> test.php?var1=a&var5=f&var16=d .  If I then select and option on this
> new form and then send it to itself I lose everything that was
> originally there (output might then be test.php?newvar=new)
>
> The line which executes my form is (currently)  action="" method="get"
> enctype="multipart/form-data"> , and as I said $REQUEST_IRI does contain
> the variables on initial loading.  I need to keep these initial
> variables and add the new (ie test.php?var1=a&var5=f&var16=d&newvar=new)
>
> Please help!
>
> Thanks,
> Michael.
>
>
>
> --
> 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]

2001-02-22 Thread Peter Houchin

if i have a form with a select box in it how an i get the values to echo a php value 
...

ie

 
ACT 
VIC 
 

can i change it to say
 
ACT 
VIC 
 

so that when the page loads it shows which ever option is in the Data base?

Peter Houchin
Sun Rentals
[EMAIL PROTECTED]




[PHP] Script not updating

2001-02-25 Thread Peter Houchin

Could some one please have a look thru my code and tell me why it creates a new record 
instead of updating the record?

What this script is suposed to do is show a HTML form .. then once the user fills it 
out it then shows another form which echo's the values inputted in the first so the 
user can update if they made a mistake .. it does everything right .. up until the 
user clicks on update ... where instead of updating the record it creates a new one ..

Any sussestions/Help would be greatful


Peter Houchin
Sun Rentals
[EMAIL PROTECTED]

";
echo "";
echo "";
 
?> 
Please Check your information, and change any details that are not correct, then 
click update. if this information is correct click here";?>. 
   
  The 
information you entered is:
 Your 
Name: 
  Company: 
  Address: 
  Suburb: 
  State: 
  Post 
Code: 
  Phone:*>02>03>07>08 
  Fax:*>02>03>07>08 
  Email 
Address: 
Secret 
Word:**









\n";
}
} 
else {
 
 
 
?> 
   Name: 
   Company: 
   Address: 
  
Suburb:   
 
State:   ACT 
NSW NT 
QLD SA 
TAS VIC WA 
  Post 
Code: 
  Phone:* 
 02 03 

07 08   
  Fax:* 
 02 03 
07 08   
Email: 
 Secret 
word:** 
    
 
  * 
Please Include your area code with your phone & fax number. **Please 
include a secret word (maximum of 15 characters) for verification should you lose 
your password. 



RE: [PHP] Script not updating

2001-02-25 Thread Peter Houchin


but that's why i've got the
if($name){ 
if($submit) ...


clause in it .. thinking that if there was a name then update the record..
otherwise create a new one
-Original Message-
From: Simon Garner [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 26, 2001 10:36 AM
To: Peter Houchin; PHP MAIL GROUP
Subject: Re: [PHP] Script not updating


From: "Peter Houchin" <[EMAIL PROTECTED]>


> Could some one please have a look thru my code and tell me why it creates
a new record instead of updating the record?
>

[snip]

>
> if ($submit){
>
>  $result = mysql_query("INSERT INTO app
(name,company,address,suburb,state,post,areacode,phone,faxareacode,fax,email
,secret) VALUES
('$name','$company','$address','$suburb','$state','$post','$areacode','$phon
e','$faxareacode','$fax','$email','$secret')");
>


^^ Here's your culprit. Check your logic. Whenever they push submit it
INSERTs a new record (I think...).


Regards

Simon Garner



-- 
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] switch statement

2001-02-25 Thread Peter Houchin

Does any one know where there are some tutorials for the switch statement?

Peter Houchin
Sun Rentals
[EMAIL PROTECTED]




RE: [PHP] switch statement

2001-02-25 Thread Peter Houchin


I'm playing aruond with the switch statement trying to get one to work for
$submit
I have 2 forms on the one page (only one displays at a time) 1 is for
creating a new record in my data base the other is for updating/changing
values from the first form should there be any. So i want it to switch
between the 2 cases
-Original Message-
From: David Robley [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 26, 2001 1:34 PM
To: Peter Houchin; PHP MAIL GROUP
Subject: Re: [PHP] switch statement


On Mon, 26 Feb 2001 12:33, Peter Houchin wrote:

> > Does any one know where there are some tutorials for the switch
> statement?

> Peter Houchin
> Sun Rentals
> [EMAIL PROTECTED]
>

Have a quick look at
http://www.php.net/manual/en/control-structures.switch.php
which has some user notes which are possibly useful over and above the
actual documentation.

--
David Robley| WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet| http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA

--
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] forms & functions

2001-02-26 Thread Peter Houchin

Hiya,

Can i call a function from the action line of a form?

ie:


[PHP] calling functions

2001-02-26 Thread Peter Houchin

Hiya,

Can i call a function from the action line of a form?

ie:


[PHP] redirect pages

2001-02-26 Thread Peter Houchin

can some one offer a suggestion please ... i have a  

if ($update) {
$result=foo;
}

in that if statement i want to redirect them to another page after it has processed 
the result ..

i tried having using

if ($update) {
$result=foo;
echo "";
}

but to no avail ..

any suggestions ?

Peter Houchin
Sun Rentals
[EMAIL PROTECTED]




RE: [PHP] mail() question

2001-02-27 Thread Peter Houchin


Set your mail script up something like

//open the file
$myfile= file("data.txt");

//put file contents into one string
$myfile = implode($myfile, "");

$mailTo = "[EMAIL PROTECTED]"; // if its going to more than one use a
comma after "
$mailSubject = "some subject"; // subject of email
$mailBody = $myfile // call in $myfile
$mailHeaders "From: [EMAIL PROTECTED]\n"; add mail headers here

mail($mailTo, $mailSubject, $mailBody, $mailHeaders);

& your done
I can't see why this wouldn't work for you

Peter

-Original Message-
From: W.D. [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 28, 2001 10:34 AM
To: Peter Houchin; [EMAIL PROTECTED]
Subject: Re: [PHP] mail() question


just the info in the .txt file


> did you want to actually send the .txt file or just the info in the .txt
> file??
>
> -Original Message-
> From: W.D. [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 28, 2001 10:19 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] mail() question
>
>
> I want to send a .txt file back to the sender when a form is filled out,
> sort of like an autoresponder. I have one mail() to send info from form to
> me, is the only way to send out a file back to the sender by using a
second
> mail()?
>
>
> _
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.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]
>


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.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] NN Problem

2001-02-27 Thread Peter Houchin

Has any one had/heard this problem... My page doesn't load properly with netscape 4.5  
Under Solaris but on WINNT 4 under both ie & NN it loads perfectly can any one offer 
any suggestions?

Peter Houchin
Sun Rentals
[EMAIL PROTECTED]




[PHP] Ideal cookie lift time???

2001-02-27 Thread Peter Houchin

Hiya as this is my first time using cookies could some one please give me an typical 
life time for a cookie before is destroys its self?

thanks

Peter Houchin
Sun Rentals
[EMAIL PROTECTED]




[PHP] mail problem

2001-03-04 Thread Peter Houchin

Hiya,
am near completeion of a site only i can't get any mail to send to multiple recipients 
at all .. either in the  "To:" section or having on email in "To" and one email 
address in "CC" section.. and i need to be able to do this ... can any one offer any 
suggestions ...( I'd prefer to have one in the "To" section and one in the "CC" 
section 
I'm am using sendmail on solaris 2.6 to send the actual emails

<-- Start of snip--->
$address .= $email  ;
$subject = "VFSA-eRentals Calculation Results";
$body="blah blah\n";
$headers .= "CC: [EMAIL PROTECTED] "; 
mail("$address", "$subject", "$body", "$headers \nContent-Type: text/plain; 
charset=iso-8859-1\nContent-Transfer-Encoding: 64bit"  );
<--- end of snip--->


any help would be greatful :)
Peter Houchin
Sun Rentals
[EMAIL PROTECTED]




RE: [PHP] mail problem

2001-03-05 Thread Peter Houchin

Now if i include
$headers .= "Cc: [EMAIL PROTECTED] " . " , ";
$headers .=  "[EMAIL PROTECTED]\n";
My page won't load at all apart from the first include i have on my page..
does any one have any idea's?



Hiya,
am near completeion of a site only i can't get any mail to send to multiple
recipients at all .. either in the  "To:" section or having on email in "To"
and one email address in "CC" section.. and i need to be able to do this ...
can any one offer any suggestions ...( I'd prefer to have one in the "To"
section and one in the "CC" section
I'm am using sendmail on solaris 2.6 to send the actual emails

<-- Start of snip--->
$address .= $email  ;
$subject = "VFSA-eRentals Calculation Results";
$body="blah blah\n";
$headers .= "CC: [EMAIL PROTECTED] ";
mail("$address", "$subject", "$body", "$headers \nContent-Type: text/plain;
charset=iso-8859-1\nContent-Transfer-Encoding: 64bit"  );
<--- end of snip--->


any help would be greatful :)
Peter Houchin
Sun Rentals
[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] mail ....any idea's?

2001-03-05 Thread Peter Houchin

Hiya,
am near completeion of a site only i can't get any mail to send to multiple
recipients at all .. either in the "To:" section or having on email in "To"
and one email address in "CC" section.. and i need to be able to do this ...
can any one offer any suggestions ...( I'd prefer to have one in the "To"
section and one in the "CC" section
I'm am using sendmail on solaris 2.6 to send the actual emails
<-- Start of snip--->
$address .= $email ;
$subject = "VFSA-eRentals Calculation Results";
$body="blah blah\n";
$headers .= "CC: [EMAIL PROTECTED] ";
mail("$address", "$subject", "$body", "$headers \nContent-Type: text/plain;
charset=iso-8859-1\nContent-Transfer-Encoding: 64bit" );
<--- end of snip--->

Now if i include
$headers .= "Cc: [EMAIL PROTECTED]";

My page won't load at all apart from the first include i have on my page..
does any one have any idea's?
any help would be greatful :)

Peter Houchin
Sun Rentals
[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]




  1   2   3   >