[PHP] session_register()

2001-04-20 Thread Wade

I am registering a number of variables. Can I combine them into one
session_register, such as session_register("one", "two" ... "n")?

Thanks
Wade



-- 
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] Redirection II

2001-04-21 Thread Wade

I am submitting a form to a PHP page. I would like to check the form
variables before I load the page, and redirect them to another page if they
variables are incorrect -- so they can fix them.

Any ideas how I do this?
My idea was to start out the PHP with an if statement, and redirect in the
case something was wrong. But I'm really having a hard time finding a way to
do this.

Thank you!
Wade



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




Re: [PHP] Redirection II

2001-04-21 Thread Wade

I got it! :-)

""Wade"" <[EMAIL PROTECTED]> wrote in message
9bsudp$g23$[EMAIL PROTECTED]">news:9bsudp$g23$[EMAIL PROTECTED]...
> I am submitting a form to a PHP page. I would like to check the form
> variables before I load the page, and redirect them to another page if
they
> variables are incorrect -- so they can fix them.
>
> Any ideas how I do this?
> My idea was to start out the PHP with an if statement, and redirect in the
> case something was wrong. But I'm really having a hard time finding a way
to
> do this.
>
> Thank you!
> Wade
>
>
>
> --
> 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] Newbie Question

2001-04-23 Thread Wade

I wanted to say thanks to all those that have helped me. This is really a
great language and I am doing things I never thought I'd be able to do!

Now to my question:

I am doing some form validation, where I check the values entered by the
user. If the value is correct, I format the results and print it out. If it
is not correct, I want to allow them to fix it. When I have a text field,
like first_name, I'm ok. But when I do an HTML list menu, I'm having
troubles.

Basically, this is what I want to do. If the value is correct, print the
value. If it is not correct, display the list box. Here's an example (but
you can see my else statement is wrong, and this is what I need help with):

  if (my_type != "0"){
switch($my_type){
case "one":
print "";
print " One";
break;
case "two":
print "";
print " Two";
break;
case "three":
print "";
print " Three";
break;
   }
  }
  else {
  
Select a Value
One
Two
Three
  
 }
 }



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




Re: [PHP] Newbie Question

2001-04-23 Thread Wade

Stewart-

Thanks a great deal

It works now.

Wade

""Taylor, Stewart"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> You've got some typo's
> if (my_type != "0"){  --> if ($my_type != "0") {
>
> Plus you forgot to use the print function (or to turn off php ?>) to
output
> the Select HTML.
>
> -Stewart
>
> -Original Message-
> From: Wade [mailto:[EMAIL PROTECTED]]
> Sent: 23 April 2001 16:15
> To: [EMAIL PROTECTED]
> Subject: [PHP] Newbie Question
>
>
> I wanted to say thanks to all those that have helped me. This is really a
> great language and I am doing things I never thought I'd be able to do!
>
> Now to my question:
>
> I am doing some form validation, where I check the values entered by the
> user. If the value is correct, I format the results and print it out. If
it
> is not correct, I want to allow them to fix it. When I have a text field,
> like first_name, I'm ok. But when I do an HTML list menu, I'm having
> troubles.
>
> Basically, this is what I want to do. If the value is correct, print the
> value. If it is not correct, display the list box. Here's an example (but
> you can see my else statement is wrong, and this is what I need help
with):
>
>   if (my_type != "0"){
> switch($my_type){
> case "one":
> print " height=\"26\" alt=\"One\">";
> print " One";
> break;
> case "two":
> print " height=\"26\" alt=\"Two\">";
> print " Two";
> break;
> case "three":
> print " height=\"26\" alt=\"Three\">";
> print " Three";
> break;
>}
>   }
>   else {
>   
> Select a Value
> One
> Two
> Three
>   
>  }
>  }
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




[PHP] print and echo

2001-04-23 Thread Wade

What's the difference between these two and is there a preference in which
one to use?

-Wade



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




Re: [PHP] print and echo

2001-04-23 Thread Wade

Thank you!

""Angerer, Chad"" <[EMAIL PROTECTED]> wrote in message
9E35C54B0C7AD411B5C1009027DE539940B5ED@MSPMX01">news:9E35C54B0C7AD411B5C1009027DE539940B5ED@MSPMX01...
> This has been answered several times I think
>
> check here
>
> http://www.faqts.com/knowledge_base/view.phtml/aid/1/fid/40
>
> CAA
>
> -Original Message-
> From: Wade [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 23, 2001 10:43 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] print and echo
>
>
> What's the difference between these two and is there a preference in which
> one to use?
>
> -Wade
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




[PHP] Posting to a form

2001-04-23 Thread Wade

I'm trying to do the following



But when Aname is multiple words, such as "Wade Williams", everything from
the whitespace on gets cut off.

Any ideas how to fix this?

Thanks
Wade



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

2001-04-24 Thread Wade

I am attempting to do an   ereg_replace(),  but the charachter I want to
replace is a \. Any Ideas how I make the following work?

$F_name = ereg_replace ("\", "", $acc_fname);
echo $F_name;

Thanks,
Wade



-- 
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] Escaping Characters

2001-04-25 Thread Wade

Aside from " (quotes), which HTML characters should be preceded with a \
(backslash) to avoid parsing errors?

I have the following, which I have in an .inc file outside my web root. I
have tried sticking the \ in front of the # (pound) and the = (equal) -- not
out of any reason, but more out of frustration. I have been sticking
dropdown menu in inc files with no troubles, but this is the first table
I've tried to stick in there.  I'm trying not to ask questions here until
after trying to find an answer in PHP.net, but I've had no luck on this one.

  

....
?>

Much Thanks,
Wade



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




Re: [PHP] selected

2001-04-25 Thread Wade

I am sure my solution is not the most elegant, but this is what I did:



ALABAMA

?>

""Hasbullah Pit (sebol)"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have this one :-
>
> 
>   Penuh
>   Separuh
>   Sendiri
> 
> and a field of table which contained with
> 'Penuh' OR 'Separuh' OR 'Sendiri'
>
> I want to make it Ither one is 'selected' during a particular time.
> i'm thinking of having something like this:-
>
>
> 
> 
> >Penuh
> 
> >Separuh
>  >
> Sendiri
> 
>
> Is that any prebuild/example funtion for  that
> function_that_determine_it_selected_or_not(Sendiri) then print
> "Selected" ?
>
> thanks in advance
>
>
> --
> Hasbullah Bin Pit (sebol) http://ikhlas.com
>
> " Melihat keadaan sistem kehakiman sekarang ini,
>   Saya tak hairan kalau saya disabitkan dengan kesalahan
>  'Menceraikan isteri di luar mahkamah' ketika saya masih bujang"
>- Hasbullah Pit -
>
> --
> 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] querystring and PHP 4

2002-12-04 Thread Dan Wade
Hello,

i'm grabbing querystring data like:
www.myserver.com/foo.php?id=bar



It works like a champ on dev server using php 3 but the sys admin
use PHP 4 on the production box and the querystring is no longer being
passed.
I can't imagine this changed from version to version.

Is he missing something in his install?

thanks,

-Dan


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




[PHP] fwrite() blank-line Quirk?

2002-12-21 Thread Noel Wade
Hi All,

Relatively new PHP coder (was in an MS / ASP shop before)...  I'm doing some
flat-file manipulation (please, spare me the database comments, I'm working
on it!), and I'm having to read strings out of one file and copy them into
another until a while() condition is satisfied.

The problem is, I seem to always end up with a blank line at the end of my
files (which then screws up later file-processing) - I'm assuming because of
the \n that fwrite() appends to the end of each string...

Is there a simple way to get rid of this blank line or somehow get fwrite()
to NOT put a newline on the end of a string?

Thanks in Advance,

--Noel Wade





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




[PHP] fgets() question?

2002-12-21 Thread Noel Wade
Okay, attacking my flat-file issues from the other end:

When you use $foo = fgets($fp_file);  it appears that a blank line ends up
looking exactly like a FALSE ("failed to read") return value...  Is there
any way to differentiate between an empty-string read (a blank line in a
flat-file) and a FALSE return from fgets() ??

Thanks a bunch,

--Noel




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




[PHP] Re: fgets() question?

2002-12-22 Thread Noel Wade
> A blank line should return the newline (\n or \r\n), according to
> http://www.php.net/manual/en/function.fgets.php. Also try using '===' (3 =
> signs) as the operator, which enforces type checking on a comparison).

Yes or no:

$foo == FALSE === 0;

???

Right now I'm just doing

if($foo)

And "\n" seems to equate to FALSE with this sort of conditional /
comparison...

Thanks, take care,

--Noel



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




[PHP] Passing Query_String or variables through multiple pages?

2003-01-05 Thread Noel Wade
Hi all,

I have an issue I'm hoping there's a simple answer for (I'm betting there
is):

I have a dynamic page where the user may click on a link - this link
processes their data and shows them a "result" page...

Then I want a variable (for a manual hypertext link) that contains the
original URL they were viewing.  The problem is, the original page / URL
needs a query string (i.e. "?key1=val1&key2=val2&key3=val3...").

So I have to somehow pass their original query string THROUGH the "result
page" via a GET, and without using a  (using a POST form I could do
it)...  I've looked at manually copying and "forwarding" each original
variable by including it in the URL for the "result page"; but I was hoping
for something more elegant and flexible...

Any thoughts or ideas?

Thanks a bunch in advance!  Take care,

--Noel




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




[PHP] Can you insert into $_POST manually?

2003-01-09 Thread Noel Wade
Hi all,

So I have a page that processes information and then "echo"s out a redirect
that looks like this:



The thing is, there are some variables that I would love to pass in $_POST
or $HTTP_POST_VARS to the page referred to in "$url".

Is there any way to stuff this data into either of these globals so that the
"$url" page can access 'em?

Thanks a bunch!

--Noel




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




[PHP] Re: session not set, server configuration?

2003-01-09 Thread Noel Wade
James -

Don't know how you're working with Cookies and sessions for sure, but the
default / "easy" way to check for an established session is to put
"session_start();" at the top of every page that's going to access the
session variables.  That will check for an established/open session and make
the registered session variables accessible to the page.

Then a logical check is as simple as using "session_is_registered()" like
this:

if (session_is_registered("registered_variable_name"))
//do something here if the person has already registered their session
else
//session not registered!

Hope this helps!

Take care,

--Noel




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




Re: [PHP] Can you insert into $_POST manually?

2003-01-09 Thread Noel Wade
Thanks - I understand that method; but I'm really looking for a way to pass
them without them being visible / mucking up the URL line with a buncha
stuff...

Take care,

--Noel



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




Re: [PHP] Can you insert into $_POST manually?

2003-01-09 Thread Noel Wade
This will work perfectly!  Actually, building a dynamic javascript function
and/or hidden form will allow me to collapse a couple of other redirect
systems on my site into one... Thanks a bunch!

--Noel

"Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> You can also build a form with hidden variables and use
>  to submit it. For javascript
> disabled browser put a
> "Continue" submit button






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




[PHP] Re: how to passing two dimension array

2003-01-10 Thread Noel Wade
You're missing string concatenation operators.  I use "echo" instead of
"print" - but here's how it should look with either:

echo "";

Explanation:  The \" makes the double-quote appear in the final HTML, then
you have to use a plain " to end the text string.  Then you use the .
concatenation operator, followed by your variable.  To add further text, use
another . operator, then " to open up the text string, then \" for the HTML
close-quote, then the > to close the HTML tag, then " to close out the echo
or print statement.  End with a ;

Let me know if that helps!

Take care,

--Noel


"Rizki Salamun" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hi there..
>
> I have a problem when I want to passing two dimension varible. I made this
> variable from html form.
>
> like this:
>
>
> 
>  print "";
> ?>
>a
>b
>...
>...
> 
> 
>
> but when again I want to print the $vari[$i][$j, in the page2.php it
> seems doesnt recognize this variable.
>
>
> thanks
>
> -rizki-
>
>



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




[PHP] Re: how can I use an external 'template' file and still use PHP variables?

2003-01-10 Thread Noel Wade
I agree with Edwin on this one.

What's the <<< for??

Could it be you want to be doing this:

$templatestring = include("/pathto/email_template.php");

$message = "<<" tags
will be considered plain text.  Put another way: Even though the "include"
statement in the main document is ALREADY between PHP tags, the parser looks
for an opening PHP tag in the included file to find where to begin parsing -
anything before that opening tag is echo'ed out as plain text).

Hope this helps!

Take care,

--Noel


---
"Daevid Vincent" <[EMAIL PROTECTED]> wrote in message
006801c2b88d$69748a60$0801a8c0@telecom">news:006801c2b88d$69748a60$0801a8c0@telecom...
> I've posted this a few weeks ago with no response. I want to use an
> external
>
> $message = <<   include("/pathto/customer_email.php");
> HTMLMESSAGE;
>




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




[PHP] Session vars vs. POST/GET vars?

2003-01-11 Thread Noel Wade
Hi all,

So I have a session variable; but with register_globals active on the server
I'm hosted at (no way to turn it off), just checkng for "$varX" in my script
could retrieve the session variable, a GET variable with the same name, or a
POST variable with the same name - and as a security concern, someone could
use a GET request (http://somehost/mypage.php?varX=0) to spoof the script
into thinking that "varX" is the wrong value.

So, is there any way in a script to specify that I want to retrieve the
value stored in the registered session_variable("varX")??

Thanks,

--Noel




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




[PHP] Re: Session vars vs. POST/GET vars?

2003-01-11 Thread Noel Wade
Nevermind, just found the $HTTP_SESSION_VARS array...

Thanks anyways!  Take care,

--Noel

"Noel Wade" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi all,
>
> So I have a session variable; but with register_globals active on the
server
> I'm hosted at (no way to turn it off), just checkng for "$varX" in my
script
> could retrieve the session variable, a GET variable with the same name, or
a
> POST variable with the same name - and as a security concern, someone
could
> use a GET request (http://somehost/mypage.php?varX=0) to spoof the script
> into thinking that "varX" is the wrong value.
>
> So, is there any way in a script to specify that I want to retrieve the
> value stored in the registered session_variable("varX")??
>
> Thanks,
>
> --Noel
>
>
>



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




[PHP] SELECT MULTIPLE form variable?

2003-06-14 Thread Noel Wade
Hi all,

So I was under the impression that an HTML form "SELECT MULTIPLE" item would
return an array with all of the selected items.  This array can then be used
with any of the standard PHP array functions, yes?

I have 1 HTML page that seems to work fine...  However, another page that is
nearly identical is failing - giving me the following error:  "Wrong
datatype for second argument in call to in_array".  When I look at the
variable, it seems to ONLY contain a string - the first item the user
selected.

The only difference I can see is that the working SELECT MULTIPLE has
numerical values, and the dysfunctional one uses string values - but the
values ARE enclosed in quotation-marks... so I don't know why they're not
POSTing properly as an array.  Is this a known bug or issue?  Any thoughts
or solutions?

Thanks a bunch, take care,

--Noel



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



Re: [PHP] SELECT MULTIPLE form variable?

2003-06-14 Thread Noel Wade
Its the littlest things that kill ya  Thanks a ton!

As a side note, I definitely do NOT have the brackets on the working page -
so its an undefined "feature" (or bug) that numerical-value SELECT MULTIPLE
variables post as an array to PHP.

Take care, and thanks again!

--Noel

- Original Message -
From: "Leif K-Brooks" <[EMAIL PROTECTED]>
To: "Noel Wade" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, June 14, 2003 1:26 PM
Subject: Re: [PHP] SELECT MULTIPLE form variable?


> You need to name it formfield[], not formfield.
>
> Noel Wade wrote:
>
> >Hi all,
> >
> >So I was under the impression that an HTML form "SELECT MULTIPLE" item
would
> >return an array with all of the selected items.  This array can then be
used
> >with any of the standard PHP array functions, yes?
> >
> >I have 1 HTML page that seems to work fine...  However, another page that
is
> >nearly identical is failing - giving me the following error:  "Wrong
> >datatype for second argument in call to in_array".  When I look at the
> >variable, it seems to ONLY contain a string - the first item the user
> >selected.
> >
> >The only difference I can see is that the working SELECT MULTIPLE has
> >numerical values, and the dysfunctional one uses string values - but the
> >values ARE enclosed in quotation-marks... so I don't know why they're not
> >POSTing properly as an array.  Is this a known bug or issue?  Any
thoughts
> >or solutions?
> >
> >Thanks a bunch, take care,
> >
> >--Noel
> >
> >
> >
> >
> >
>
> --
> 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



Re: [PHP] Re: php editor?

2003-06-16 Thread Noel Wade
My favorite little gem is a shareware program called Code-Genie
(www.code-genie.com).  Its cheap, fast, a "slim" app, provides tons of
useful little features, and has TOTALLY user-configurable text-coloring.
You can specify a particular coloring scheme for each file extension, so it
automatically picks the scheme for the type of programming you're doing -
very handy!  Comes with schemes for all of the most common / simple
programming languages, plus plenty of user-made files for download, too!

It doesn't have any real debugging features, nor can it do fancy things like
track your custom object-functions and color them or present their
arguments - but for a quick, simple, helpful tool - its just perfect!

Take care,

--Noel



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



Re: [PHP] Re: PHP help/example for booking program

2003-06-16 Thread Noel Wade
Welcome, hope you enjoy PHP - its a great language!

My best suggestion is to check out the book "PHP and MySQL Web Development"
by Luke Welling and Laura Thomson - it provides you with all of the PHP &
MySQL fundamentals and good concepts for how to design something like that.
The book is aimed a little bit more at people who can already do some
programming; but you should pick it up to start with, and if it doesn't make
sense grab a smaller "beginner" book on programming and then come back to
"PHP & MySQL"

Good luck!  Take care,

--Noel


- Original Message -
From: "Giuliano" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 16, 2003 7:42 AM
Subject: [PHP] Re: PHP help/example for booking program


> Hi Other PHP Users,
>
> i am new PHP in the list; i am looking for some code example for a hotel
or
> residence booking program; can
> someone help me with good tips? some code?
>
> i thank you for every help, bye
>
> Giuliano
>
>
>
> --
> 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] Forms / Array Question...

2003-06-27 Thread Noel Wade
Hi All,

Quickie Question... Possibly a silly one; but it would make my life easier if it works!

I know that with a SELECT MULTIPLE, you have to use the convention: NAME="$varName[]" 
to get all of the responses into a nice neat array.  I'm wondering about the mechanism 
behind this - is it simply doing a behind-the-scenes "$varName[] = X;", "$varName[] = 
Y;", "$varName[] = Z;"  operation to dynamically generate the array?  (Note: this 
is not my main question - keep reading. :-P )

If so, then it would follow that it's also possible to do something like this:




...

And get a nice array with your text values.  Anyone know if this (A) works and (B) is 
not actually just some undefined behavior that's risky to use?  

Thanks!  Take care,

--Noel



[PHP] suppressing errors

2002-07-25 Thread Preston Wade

Hello All,

I am trying to use the "@" symbol to suppress errors returned by a
mysql_query call.  This doesn't seem to be working as I get an new page with
the error in it in my browser.  Any help with this would be greatly
appreciated.

Here is a snippet of the code I am using

  $query = "select user_id from users where username='$username'";
  $query_db = @mysql_query($query, $db_connection);
  $row = @mysql_fetch_array($query_db);
  if($row) {
 $message[] = "That username is already taken. Please select
another.";
  } else {

Thanks,
Preston


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




RE: [PHP] suppressing errors

2002-07-25 Thread Preston Wade

The error is one from mysql stating that I am trying to add a duplicate
entry.  I would rather handle this in my code hence the following lines in
my code.

if($row) {
  $message[] = "That username is already taken. Please select
another.";
  } else {

Thanks for the response.

Thanks,
Preston


> -Original Message-
> From: "1LT John W. Holmes" <[EMAIL PROTECTED]>@INTERNET@HHC 
> Sent: Thursday, July 25, 2002 2:53 PM
> To:   Preston Wade; [EMAIL PROTECTED]
> Subject:  Re: [PHP] suppressing errors
> 
> What is the error you get?
> 
> ---John Holmes...
> 
> - Original Message -
> From: "Preston Wade" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, July 25, 2002 3:20 PM
> Subject: [PHP] suppressing errors
> 
> 
> > Hello All,
> >
> > I am trying to use the "@" symbol to suppress errors returned by a
> > mysql_query call.  This doesn't seem to be working as I get an new page
> with
> > the error in it in my browser.  Any help with this would be greatly
> > appreciated.
> >
> > Here is a snippet of the code I am using
> >
> >   $query = "select user_id from users where username='$username'";
> >   $query_db = @mysql_query($query, $db_connection);
> >   $row = @mysql_fetch_array($query_db);
> >   if($row) {
> >  $message[] = "That username is already taken. Please select
> > another.";
> >   } else {
> >
> > Thanks,
> > Preston
> >
> >
> > --
> > 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] isset

2002-07-09 Thread Preston Wade

Hello All,

I am trying to use the isset function to test if the page has been
submitted, but it seems as though it is not working.  I am wondering is
there a configuration option that is messing with the functionality of
isset.

Any help would be appreciated.

Thanks,
Preston Wade


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




RE: [PHP] isset

2002-07-09 Thread Preston Wade

HTML form.  register_globals is off.

Thanks,
Preston

> -Original Message-
> From: "Jim lucas" <[EMAIL PROTECTED]>@INTERNET@HHC 
> Sent: Tuesday, July 09, 2002 5:29 PM
> To:   Preston Wade; [EMAIL PROTECTED]
> Subject:  Re: [PHP] isset
> 
>  <<...>> 
> what is it you are testing for?
> 
> a page that has been submitted.  do you mean from an html form or some
> other
> method?
> 
> Jim Lucas
> - Original Message -
> From: "Preston Wade" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, July 09, 2002 3:20 PM
> Subject: [PHP] isset
> 
> 
> > Hello All,
> >
> > I am trying to use the isset function to test if the page has been
> > submitted, but it seems as though it is not working.  I am wondering is
> > there a configuration option that is messing with the functionality of
> > isset.
> >
> > Any help would be appreciated.
> >
> > Thanks,
> > Preston Wade
> >
> >
> > --
> > 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] Re: isset

2002-07-09 Thread Preston Wade

Actually here is what I am trying to do.


 

blah, blah




> -Original Message-
> From: vins <[EMAIL PROTECTED]>@INTERNET@HHC 
> Sent: Tuesday, July 09, 2002 5:35 PM
> To:   [EMAIL PROTECTED]
> Subject:  [PHP] Re: isset
> 
> i think what you're trying to do is
> 
>  if($REQUEST_METHOD == "POST")
> {
> echo "Form has been submitted.";
> exit;
> }
> else
> {
> echo "Display the form that has to be submitted.':
> exit;
> }
> ?>
> 
> 
> "Preston Wade" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hello All,
> >
> > I am trying to use the isset function to test if the page has been
> > submitted, but it seems as though it is not working.  I am wondering is
> > there a configuration option that is messing with the functionality of
> > isset.
> >
> > Any help would be appreciated.
> >
> > Thanks,
> > Preston Wade
> >
> 
> 
> 
> --
> 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] isset

2002-07-09 Thread Preston Wade

This is what I was looking for.

Thanks!

Preston

> -Original Message-
> From: "Kevin Stone" <[EMAIL PROTECTED]>@INTERNET@HHC 
> Sent: Tuesday, July 09, 2002 5:37 PM
> To:   Preston Wade; [EMAIL PROTECTED]
> Subject:  Re: [PHP] isset
> 
>  <<...>> 
> 
> 
> 
> 
> if (isset($_POST['submit'])){}
> // or //
> if (isset($HTTP_POST_VARS['submit']))
> 
> If register globals is ON you can access the variable directly..
> if (isset($submit)) {}
> 
> Otherwise you can extract the post array before testing the variable..
> extract($_POST);
> if (isset($submit)) {}
> 
> Hope this gets you started.  Read up on the manual.  http://www.php.net.
> :)
> -Kevin
> 
> 
> - Original Message -
> From: "Preston Wade" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, July 09, 2002 4:20 PM
> Subject: [PHP] isset
> 
> 
> > Hello All,
> >
> > I am trying to use the isset function to test if the page has been
> > submitted, but it seems as though it is not working.  I am wondering is
> > there a configuration option that is messing with the functionality of
> > isset.
> >
> > Any help would be appreciated.
> >
> > Thanks,
> > Preston Wade
> >
> >
> > --
> > 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] Parse Error

2001-01-14 Thread Wade Halsey

Hi

Im getting a parse error with this:

$sqlCheckLogin = sqlExecute( "Select * from Sky where SkyUName = 
'".$HTTP_POST_VARS['UserName']."'
  AND SkyPasswd = '".($HTTP_POST_VARS['Password'])."'" ) ;

Help



[PHP] Populating table rows

2001-01-16 Thread Wade Halsey

Hi

Ive selected some details from a database and now want to loop through the result and 
populate a row in a table each time.


$sqlCurrentTraces = sqlExecute( "Select * from Sky where No = '$Name'" );
$result = sqlFetchObject( $sqlCurrentTraces );

$SkyDateAss = $result ->DATEASSIGNED;
$SkyDateResult = $result ->DATEAOFRESULT;
$SkyAccNo = $result ->ACCNO;

I want to do the stuff below:
   

The sql qorks and the table is populated once.

Help someone?

Thanks
Wade
[EMAIL PROTECTED]




[PHP] HTTP_POST

2001-01-16 Thread Wade Halsey

Hi

I have the following code which is created in a loop.


  
  
  
  


For example there will be three rows with different values and each checkbox will have 
a unique name.
On the next page once a submit button has been pushed I want to do:
sqlExecute( "Select * from SkyDiary where AccNo = (Here I want the value of the 
checkbox)

Do I use HTTP_POST_VARS here and if so how??
Thanks

Wade Halsey
[EMAIL PROTECTED]




[PHP] HTTP_POST???

2001-01-16 Thread Wade Halsey

Hi

I have the following code which is created in a loop.


  
  
  
  


For example there will be three rows with different values and each checkbox will have 
a unique name.
On the next page once a submit button has been pushed I want to do:
sqlExecute( "Select * from SkyDiary where AccNo = (Here I want the value of the 
checkbox)

Do I use HTTP_POST_VARS here and if so how??
Thanks

Wade Halsey
[EMAIL PROTECTED]





[PHP] Creating a text file

2001-01-17 Thread Wade Halsey

Hi

I have the following code in Delphi:
procedure TFormConfirmAllocation.CreateTxt;
var TxFile : TextFile;
 Buffer : string;
 x : integer;
begin

AssignFile(TxFile,'\SkyTrac.sky');


Rewrite(TxFile);

with FormConfirmAllocation.Query1  do begin
open;
while not Eof do begin
for x :=  0 to fields.Count - 1 do begin
Buffer := Fields[x].AsString;
Writeln(TxFile, Buffer);
end;
next;
end;
end;//with
CloseFile(TxFile);
end;

Now I want to create the same sort of thing in Php, could someone please help!
Thanks
Wade
[EMAIL PROTECTED]

 



[PHP] HTTP_POST??

2001-01-17 Thread Wade Halsey

Hi

I have a while loop which populates rows in a table, in each row is a checkbox which 
has a unique name:

 

On another page I want to output all the details in a specific table row, how do I 
check which checkbox has been checked so that specific row can be displayed?

Thanks for any help

Wade 



[PHP] Zip file

2001-01-22 Thread Wade Halsey

Hi 

Does anyone know how to create a .zip file using php?
Thanks in advance!

Wade 



[PHP] Session tracking question

2001-01-23 Thread Wade D

what do most use, combination of cookies and GET?


-- 
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] access violation

2001-02-21 Thread Wade Halsey

hi

im running iis5 and php 4.04

i get the following error :
PHP has encountered an Access Violation at 78003ABF 

im pretty sure its a server problem, can anyone confirm this or help out? if it is a 
server error how can it be fixed?

this is quite urgent

thanks
Wade



[PHP] access violation

2001-02-21 Thread Wade Halsey

hi

im running iis5 with php 4.04 as isapi accessing an interbase6 database

i get the following error :
PHP has encountered an Access Violation at 78003ABF 

this error occurs once an sql statement is run, the sql statement takes a paramater 
from a select box and then runs.It runs fine for a number of entries except for one 
entry that bombs it out with the above error. The query should return about 9900 
records. The exact query has run once but since then bombs out with the error. I have 
made no changes and the same query executes perfectly if i run it through IBConsole

im pretty sure its a server problem, can anyone confirm this or help out? if it is a 
server error how can it be fixed?

this is quite urgent

thanks
Wade
Wade Halsey
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Cell: 0835560990
Work: (043) 701 4226



Re: [PHP] PostgreSQL vs InterBase

2001-02-27 Thread Wade Halsey

Hi

We have been using Interbase for all our php development and have not
experienced problems. The oprational database is 4gigs and if we execute
large queries on it we recieve sub-second responses so speed is definetly
not a problem

Interbase is a good way to go if you have need for a relational database and
of course a bonus is that it is free :)


- Original Message -
From: Arnold Gamboa <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 27, 2001 11:00 AM
Subject: [PHP] PostgreSQL vs InterBase


> I hve heard a great deal about InterBase.  Please comment on which is
> better:
>
> 1.  Speed
> 2.  Data Reliability
> 3.  Compatibility with PHP
>
> Thanks for your comments.
>
>
>
> --
> 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] Execute sql a number of times

2001-03-14 Thread Wade Halsey

Hi

I need to execute an sql statement a certain number of times based on a users input

/* number of times to execute
$NumCases = $HTTP_POST_VARS['txtNumCases'];

/* sql to run
$GetDetails = sqlexecute("select b.accno,b.debttype, c.surname, c.initial 
,c.firstname, c.id_number, c.maidenname, c.addr_line1, c.addr_line2, c.addr_line3, 
c.addr_code, c.telnum, c.postaddress1, c.postaddress2, c.postaddress3, c.postpostcode, 
c.bankname, c.accountnumber, c.accounttype,m.magdistrictname from  bad b, client c, 
magdistrict m where b.accno = c.persal and m.code = b.magdistrictcode ");

I presume i need a while loop or someting similar but im really confused as to how to 
implement it.

Please note that I am running an Interbase database

Any help would be greatly appreciated





[PHP] Mail

2001-03-14 Thread Wade Halsey



Hi
 
im having a slight problem with this mail class, it 
works fine up until the loop runs more than 13 times, is this a looping problem 
or a mail problem? Ive attatched the mail class and the code is 
below:
 
 
include 
"./include/mime_mail.inc";$fp=fopen(TestFile.txt, "w");
/*loop certain number of times */
for ($val = 0;  $val < $NumCases; 
++$val){ if ($val < $NumCases) {
 
blah blah
 
fwrite($fp,"$FName$IDNum$Addr1$sep$Addr2$sep$Addr3 
etc etc"); /*these are vars written to the test file*/
}
else
{
/*do nothing*/
}
fclose( $fp );
 
$filename = TestFile.txt;
 
$content_type ="text/plain";
 
$fd = fopen($filename, "r");
 
$data = fread($fd, 
filesize($filename));fclose($fd);
 
/*create new mail object$mail = new 
mime_mail;$mail->from = "mailto:[EMAIL PROTECTED];$mail->to = 
"$Address";$mail->subject = "Test";$mail->body = "Test file 
sent";$mail->add_attachment($data, $filename, 
$content_type);$mail ->send();
 
Im really stumped here, any help will be greatly 
appreciated
 
Thanks
Wade
 
 

-- 
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() question

2001-03-20 Thread Wade DeWerff

is there a way to do this in a mail() ? I need to add the $Phone and $Email variables 
too the $message, but I need to format it so that it is on a new line in the 
emailI tried using  and /n, but it formats as text not code function. 


$message = $Info ."". $Phone ."". $Email;





[PHP] write to a file

2001-04-18 Thread Wade Halsey

Hi

I have the following code

$fp=fopen($agentcode.date("m-d-Y-g-i-s").'CyberTrac.ctr', "w");
fwrite($fp,"$agentcode etc etc");

$fc = fopen($fp, 'rb');
$attachment = fread($fc , filesize($filename));
fclose($fc);

$mail = new html_mime_mail('X-Mailer: Html Mime Mail Class');
$mail->add_attachment($attachment, $agentcode.date("m-d-Y-g-i-s").'CyberTrac.ctr', 
'application/octet-stream');

The file is successfuly created. When it is attatched to the email however the size is 
written as 0 bytes, the filename is the same though. If I check the file on the server 
side it s perfectly ok, any ideas?

TIA
Wade




Re: [PHP] Can I install Lihnux on My Windows 95 machine ?

2001-04-24 Thread Wade DeWerff

its much more than that however, I have Linux, 98, win2k and NT server on my
box..which has 2 physical hard drives and  5-6 partitions. However I
strongly suggest you read up on this subject of multi-boot. You have to take
into consideration that most operating systems require up to the first 4-8
mg of the hard drive and the boot files for NT OS's require to be on the
first physical hard drive at the first 2mg. Keep in mind also that LILO, the
Linux booting file cannot exist on same partition with any NT OS's. It
appears you only have 95 at this time so it wont be quite as complicated at
this time. You will have to get a boot manager that will handle partitioning
different partition types-NTFS, FAT16, FAT32, LINUX. One that will partition
these without messing up the others that you have already.



-Original Message-
From: Jack Dempsey <[EMAIL PROTECTED]>
To: Manisha <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Tuesday, April 24, 2001 8:43 PM
Subject: Re: [PHP] Can I install Lihnux on My Windows 95 machine ?


>Yes, that's the idea behind having multiple drives ( or partitions ).
>If you format F and load Linux on it, then that won't affect any other
>partition...
>
>-jack
>
>Manisha wrote:
>>
>> Hi all,
>>
>> I am having my own personal computer running on windows 95. I have C / D
/
>> E / F / G drives with FAT 32 file system with lot of information on it. I
>> can format one drive out of these.
>>
>> Can I install Linux on it  ? (i.e. format F:\ and load Linux). Later on I
>> want to load Apache also on it.
>>
>> Is it feasible ? Any information about this on web ? If I format one
drive
>> and load Linux whether other drive info will get affected ?
>>
>> manisha
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




[PHP] content-type added to php copy, changes file size , adds content-type to start of file

2001-05-05 Thread Wade Peacock

Hello Gurus,

I have an issue, that I am trying to figure out if it is an Apache config
issue or a PHP issue.

I have written a script to upload file to a directory on my RH7.0 Linux
Apache server. directory has been chmod 777.

I have a problem with my php uploads. the content-type is added at the
beginning of uploaded file. this makes file useless on server.  here is my
code for my upload page.



 
  


   Upload file!
   
   


 


Any thoughts would be appreciated.

wade




[PHP] content-type added to php copy, changes file size , adds content-type to start of file

2001-05-05 Thread Wade Peacock

Hello Gurus,

I have an issue, that I am trying to figure out if it is an Apache config
issue or a PHP issue.

I have written a script to upload file to a directory on my RH7.0 Linux
Apache server. directory has been chmod 777.

I have a problem with my php uploads. the content-type is added at the
beginning of uploaded file. this makes file useless on server.  here is my
code for my upload page.



 
  


   Upload file!
   
   


 


Any thoughts would be appreciated.

Wade Peacock
Webmaster
www.FamilyAlbum.ca
[EMAIL PROTECTED]
ICQ: 97998231




[PHP] Hit stats

2001-05-08 Thread Steve Wade

I have a set of links on my page, and I want people to be able to see:

* How many times the link has been successfully used by previous people
* If the link is broken

I'm a bit of a newbie :-)

Can anyone share some code, or explain how to do this?

Thanks heaps,
swadie

 
~~~
Steve Wade
Youth Outreach Coordinator
Fusion Australia Ltd (Sydney North)
ABN 26 001 273 105
+61 2 9477 1110



-- 
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] Newbie redirect/variable question

2001-05-10 Thread Steve Wade

I'm trying to get a redirect working - never done one before.

Here's the line from the referring page (index.php3):

test link

Here's redirect.php:



it just skips straight to the else statement. (

Can anyone see what I'm getting wrong?

Thanks heaps :-)

swadie
~~~
Steve Wade
Youth Outreach Coordinator
Fusion Australia Ltd (Sydney North)
ABN 26 001 273 105
+61 2 9477 1110




RE: [PHP] Newbie redirect/variable question

2001-05-10 Thread Steve Wade

Ok - thanks - my new redirect.php is




I get the following message...

Warning: Cannot add header information - headers already sent by (output
started at /home/swadie/public_html/redirect.php:2) in
/home/swadie/public_html/redirect.php on line 9


~~~
Steve Wade
Youth Outreach Coordinator
Fusion Australia Ltd (Sydney North)
ABN 26 001 273 105
+61 2 9477 1110


-Original Message-
From: Rares [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 10 May 2001 21:33
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Newbie redirect/variable question


hey! what's that 'echo'  doing there?
if you want to use header (and you want to) it must be the firts thing you
output from your script
so.. first of all loose the 'echo' stuff

- Original Message -
From: "Steve Wade" <[EMAIL PROTECTED]>


> Here's redirect.php:
>  echo $fred;



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


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




RE: Re[2]: [PHP] Newbie redirect/variable question

2001-05-10 Thread Steve Wade

Ahh - thanks - that's helped :-) (Line 9 was the http_referrer line)

Now the only trouble is, it seems to still treat $fred as null.

The passing line is from index.php:

test link

 Should this work?

Thanks,

Steve
~~~
Steve Wade
Youth Outreach Coordinator
Fusion Australia Ltd (Sydney North)
ABN 26 001 273 105
+61 2 9477 1110


-Original Message-
From: Adaran (Marc E. Brinkmann) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 10 May 2001 22:20
To: [EMAIL PROTECTED]
Subject: Re[2]: [PHP] Newbie redirect/variable question


Hi Steve,

Thursday, May 10, 2001, 1:39:36 PM, you wrote:
Steve> Ok - thanks - my new redirect.php is

Steve>  if ($fred != "") {
Steve> # $statement = "UPDATE links SET hits=hits+1 WHERE href=\"$u\"";
Steve> # mysql_query($statement);
Steve> Header("Location: $fred");
Steve> exit;
Steve> } else {
Steve> Header("Location: $HTTP_REFERRER");
Steve> exit;
Steve> }
?>>

Steve> I get the following message...
Steve> Warning: Cannot add header information - headers already sent by
(output
Steve> started at /home/swadie/public_html/redirect.php:2) in
Steve> /home/swadie/public_html/redirect.php on line 9

Make sure you have NO Blanks or any other Text before the http://www.adaran.net



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


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




Re[2]: [PHP] Newbie redirect/variable question

2001-05-10 Thread Steve Wade

Thanks - hmm - doesn't seem to do it though.

My current code is:



which gives an error msg:


Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or
`T_NUM_STRING' in /home/swadie/public_html/redirect.php on line 6


~~~
Steve Wade
Youth Outreach Coordinator
Fusion Australia Ltd (Sydney North)
ABN 26 001 273 105
+61 2 9477 1110


-Original Message-
From: Jakob Kruse [mailto:[EMAIL PROTECTED]]
Sent: Friday, 11 May 2001 0:00
To: [EMAIL PROTECTED]
Subject: Re: Re[2]: [PHP] Newbie redirect/variable question


You should probably urlencode the address first, like this:

">test link

Not sure if it solves the problem though.

Regards,
Jakob Kruse

""Steve Wade"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Ahh - thanks - that's helped :-) (Line 9 was the http_referrer line)
>
> Now the only trouble is, it seems to still treat $fred as null.
>
> The passing line is from index.php:
>
> test link
>
>  Should this work?
>
> Thanks,
>
> Steve
> ~~~
> Steve Wade
> Youth Outreach Coordinator
> Fusion Australia Ltd (Sydney North)
> ABN 26 001 273 105
> +61 2 9477 1110




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


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




Re[2]: [PHP] Newbie redirect/variable question

2001-05-10 Thread Steve Wade

:-) :-)

Got it working - thanks heaps everyone :-)

Out of interest - here's my current redirect.php...



 
and the updated referring code...

http://www.fusion.org.au";>test link

Whew! Now to work on the hits counter bit...

swadie

~~~
Steve Wade
Youth Outreach Coordinator
Fusion Australia Ltd (Sydney North)
ABN 26 001 273 105
+61 2 9477 1110


-Original Message-
From: bill [mailto:[EMAIL PROTECTED]]
Sent: Friday, 11 May 2001 0:33
To: Steve Wade
Cc: PHP News
Subject: Re: Re[2]: [PHP] Newbie redirect/variable question


On Fri, 11 May 2001, Steve Wade wrote:

> Thanks - hmm - doesn't seem to do it though.
>
> My current code is:
>
> 
> if ($HTTP_GET_VARS['fred'] != "") {
> # $statement = "UPDATE links SET hits=hits+1 WHERE href=\"$u\"";
> # mysql_query($statement);
> header("Location: $HTTP_GET_VARS['fred']");
> exit;
> } else {
> header("Location: $HTTP_REFERRER");
> exit;
> }
> ?>
>
> which gives an error msg:
>
> Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or
> `T_NUM_STRING' in /home/swadie/public_html/redirect.php on line 6
>

I noticed that you were passing the URL like this (from an earlier
message):

> > test link

if you put this in Location: without prefixing it with "http://"; it may be
treated as a local url or something that is not what you intend. I don't
think it is what is causing this specific error, but it could be the next
one :-))).




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


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




RE: Re[2]: [PHP] Newbie redirect/variable question

2001-05-11 Thread Steve Wade

Thanks - the hassle is - my isp doesn't use mysql - so i have to use text
files I reckon :-)

swadie


~~~
Steve Wade
Youth Outreach Coordinator
Fusion Australia Ltd (Sydney North)
ABN 26 001 273 105
+61 2 9477 1110


-Original Message-
From: James Holloway [mailto:[EMAIL PROTECTED]]
Sent: Friday, 11 May 2001 0:29
To: [EMAIL PROTECTED]
Subject: Re: Re[2]: [PHP] Newbie redirect/variable question


Steve,

The way you are doing things could leave yourself open with all kinds of
problems - one of which is address spoofing.  A better way would be to TEST
the link against values in the database before updating the link with a hit
and exiting.  Have the URL's marked against an auto-incremented id:

id: 23
name: Steve's page
url: http://www.somewhere.com

Url: redirect.php?id=23

redirect.php:





Link not found



No corresponding link found!







Much better that way, IMO. At present, if someone typed in a fake address,
the database would attempt to update a non-existant entry

You could go further, and log the IP of the user, and perhaps even set a
cookie if you were totally paranoid about people repeatedly clicking their
links so that they got more hits out.

Have fun ;)

James.


""Steve Wade"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Ahh - thanks - that's helped :-) (Line 9 was the http_referrer line)
>
> Now the only trouble is, it seems to still treat $fred as null.
>
> The passing line is from index.php:
>
> test link
>
>  Should this work?
>
> Thanks,
>
> Steve
> ~~~
> Steve Wade
> Youth Outreach Coordinator
> Fusion Australia Ltd (Sydney North)
> ABN 26 001 273 105
> +61 2 9477 1110
>
>
> -Original Message-
> From: Adaran (Marc E. Brinkmann) [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 10 May 2001 22:20
> To: [EMAIL PROTECTED]
> Subject: Re[2]: [PHP] Newbie redirect/variable question
>
>
> Hi Steve,
>
> Thursday, May 10, 2001, 1:39:36 PM, you wrote:
> Steve> Ok - thanks - my new redirect.php is
>
> Steve>  Steve> if ($fred != "") {
> Steve> # $statement = "UPDATE links SET hits=hits+1 WHERE
href=\"$u\"";
> Steve> # mysql_query($statement);
> Steve> Header("Location: $fred");
> Steve> exit;
> Steve> } else {
> Steve> Header("Location: $HTTP_REFERRER");
> Steve> exit;
> Steve> }
> ?>>
>
> Steve> I get the following message...
> Steve> Warning: Cannot add header information - headers already sent by
> (output
> Steve> started at /home/swadie/public_html/redirect.php:2) in
> Steve> /home/swadie/public_html/redirect.php on line 9
>
> Make sure you have NO Blanks or any other Text before the  to be
> the first two characters in the file. Which line is line 9 ?
>
> ---
> EnjoY,
>  Adaran ([EMAIL PROTECTED])
>check http://www.adaran.net
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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


-- 
PHP 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] fgetcsv

2001-05-13 Thread Steve Wade

Hi all - just wondering if anyone knows of a function like fputcsv - that
is, writes a line to a csv file - opposite of fgetcsv.

Any help would be appreciated :-)

swadie

~~~
Steve Wade
Youth Outreach Coordinator
Fusion Australia Ltd (Sydney North)
ABN 26 001 273 105
+61 2 9477 1110




RE: [PHP] fgetcsv

2001-05-13 Thread Steve Wade

Thanks - what I want to do is just say something like fputcsv($myarray) -
and not have to worry about putting in the commas or whatever myself... will
fputs do that?

(In case it wasn't clear - I'm wanting to write back to the file, having
already read from it using fgetcsv)

swadie


~~~
Steve Wade
Youth Outreach Coordinator
Fusion Australia Ltd (Sydney North)
ABN 26 001 273 105
+61 2 9477 1110


-Original Message-
From: Jason Murray [mailto:[EMAIL PROTECTED]]
Sent: Monday, 14 May 2001 14:19
To: 'Steve Wade'; PHP News
Subject: RE: [PHP] fgetcsv


> Hi all - just wondering if anyone knows of a function like
> fputcsv - that is, writes a line to a csv file - opposite of fgetcsv.

A CSV file is just a text file with a different file extension,
so you can use fgets to write it out...

Jason

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


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




RE: [PHP] HallMark uses PHP!!!!

2001-05-13 Thread Steve Wade

Hmm - seems clear to me that PHP *is* some form of drug - judging by the way
it seems to affect some people's lives... *grin*




~~~
Steve Wade
Youth Outreach Coordinator
Fusion Australia Ltd (Sydney North)
ABN 26 001 273 105
+61 2 9477 1110


-Original Message-
From: Joseph Blythe [mailto:[EMAIL PROTECTED]]
Sent: Monday, 14 May 2001 14:31
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] HallMark uses PHP


[EMAIL PROTECTED] wrote:

> I was just looking at Hallmark Channels' website, and noticed them to be
using PHP, wow, PHP has rocketed to something, eh.

Yes, when I first started using php nearly 2 years ago not many people
even knew what it was (most thought it was some form of a drug). Now
days you are hard pressed not to at least come across one site using it
during a normal web browsing session.

Long Live PHP,

Joseph





--
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] File pointers

2001-05-15 Thread Steve Wade

Any easy way to make the file pointer go up one line in a text file?

(I am thinking of using ftell(), then working out the length of the line,
and then fseek()?)

Thanks :-)

swadie

~~~
Steve Wade
Youth Outreach Coordinator
Fusion Australia Ltd (Sydney North)
ABN 26 001 273 105
+61 2 9477 1110




[PHP] Whitespace

2001-05-22 Thread Wade Halsey

Hey

How can I add a certain number of whitespace chars to a text file?
I write variables to a text file and I want to seperate them by certain numbers of 
whitespace chars

eg : $var(40 whitespace)$var2(10 whitespace)

TIA

Wade



[PHP] wait for existance of a remote file.....

2002-01-30 Thread Wade Barrance

I need a function that will wait for the existence of a remote file.
Does anybody know how this could be done??
 
Cheers,
Wade



[PHP] multiple select list

2002-04-18 Thread Preston Wade




Hello All,

I have seen what I am trying to do on other web sites, but they were written
in client side scripting languages.  This may or may not be a limitation of
server side scripting languages.  What I am trying to do is dynamically
generate 2 drop down list.  I want the second list to contain different
values based on what people choose in the first drop down list.  If someone
could guide me to some documentation on how to accomplish this it would be
greatly appreciated.

Thanks,
Preston




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




[PHP] not working

2001-03-21 Thread Wade DeWerff

this is opening home.php instead of the test include file..whats wrong?

Test



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




Re: [PHP] not working

2001-03-21 Thread Wade DeWerff

Well Im trying to use a template system for pages. php4 bible lists it as
sort of a GET method of handling links rather than creating all of the
pages, you just use template with includes



>What are you wanting to do?  Let's assume :
>
>a. You want soon-to-be-included file names to depend on values
>   passed through the url QUERY_STRING (links). (also, be careful)
>b. The file containing this code is called home.php
>
>Let's slightly modify your code :
>
>Test
>
>
>Is that what you're wanting to do?  Btw, it's looking for home.php because
>that's what your link referring to, it isn't trying to include it ...
>let's hope not at least :)  So perhaps currently the file holding this
>code isn't home.php when it should be.
>
>Regards,
>
>Philip
>
>
>On Wed, 21 Mar 2001, Wade DeWerff wrote:
>
>> this is opening home.php instead of the test include file..whats wrong?
>>
>> Test
>> 
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




[PHP] sql problem

2001-03-23 Thread Wade Halsey

Hi ppl

("select empname from employer where empno = (select employercode from badclient where 
pesal = '$Persal')")

Could anyone help me out with the syntax?

Im running an interbase db and php4.04

Thanks
Wade



Re: [PHP] just a newbie in php, don't get mad

2001-03-26 Thread Wade DeWerff


buy Meloni's "PHP Essentials" or the "Teach yourself PHP in 24 hours" to
start. They are made for total beginners. Then move on to "Professional PHP
programming" or "PHP4 Bible". That will give you a better start.


>> ok as you got it already i am a newbie in php
>> could anyone please please post me what programs do I need or which could
>> help me to make some php stuff
>> sry for this may sound stupid to you all but all the manuals in the web
>> just were just talkin' 'bout totally technical stuff
>>
>> ok thnx :p
>
>I hope this site will be helpful:
>http://www.webdesigns1.com/php/
>
>Jeff Oien
>
>--
>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] sql looping problem??

2001-04-03 Thread Wade Halsey

Hi

I have the following code

/*number of times to run*/
$NumCases = $HTTP_POST_VARS['txtNumCases'];
/*execute the sql*/
$sqlLargeRequest = sqlexecute($LargeRequest);

for ($val = 0;  $val < $NumCases; ++$val){
 if ($val < $NumCases) {


$details = sqlFetchObject( $sqlLargeRequest );

$AccNo = $details ->ACCNO;
etc etc


It executes the correct number of times but doesnt move to the next record.Im using an 
Interbase DB.  Any ideas??

TIA
Wade 



Re: [PHP] help with parse

2001-04-03 Thread Wade DeWerff

ugh, ok, I was without php support for a bit, ok the script works, except
that it doesnt work...it prints even when browser is IE.


-Original Message-
From: Jason Murray <[EMAIL PROTECTED]>
To: Jason Murray <[EMAIL PROTECTED]>; 'WD'
<[EMAIL PROTECTED]>; [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Tuesday, April 03, 2001 7:54 PM
Subject: RE: [PHP] help with parse


>> > > > if ($HTTP_USER_AGENT = "Mozilla")
>>
>>^ This needs to be "=="
>
>Actually, it needs to be " if(substr($HTTP_USER_AGENT, "Mozilla"))".
>
>*slap.self*
>
>Jason
>
>--
>Jason Murray
>[EMAIL PROTECTED]
>Web Design Team, Melbourne IT
>Fetch the comfy chair!
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] help with parse

2001-04-03 Thread Wade DeWerff

well, this actually worked the way i had it ie. if ($HTTP_USER_AGENT =
"Mozilla") before I added the html outputs.


-Original Message-
From: Jason Murray <[EMAIL PROTECTED]>
To: Jason Murray <[EMAIL PROTECTED]>; 'WD'
<[EMAIL PROTECTED]>; [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Tuesday, April 03, 2001 7:54 PM
Subject: RE: [PHP] help with parse


>> > > > if ($HTTP_USER_AGENT = "Mozilla")
>>
>>^ This needs to be "=="
>
>Actually, it needs to be " if(substr($HTTP_USER_AGENT, "Mozilla"))".
>
>*slap.self*
>
>Jason
>
>--
>Jason Murray
>[EMAIL PROTECTED]
>Web Design Team, Melbourne IT
>Fetch the comfy chair!
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] IF this then, move to this line...

2001-04-05 Thread Wade DeWerff

this is mostly a C++ function, java has something similar as well
but break would be the closest


-Original Message-
From: CC Zona <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Thursday, April 05, 2001 1:03 PM
Subject: Re: [PHP] IF this then, move to this line...


>In article <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED] (Brandon Orther) wrote:
>
>> Is there a way to make my script jump to a certain line in my code if a
>> certain variable is true.  like use an if then statement to check for a
>> certain value, then if it is true jump back to line 34 (Any line really).
>
>You can't specify by line number, but you might want to see the docs on
>"break"  and
>"continue" .
>Both allow you to specify how many levels to go back.
>
>--
>CC
>
>--
>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] apostrophe checks

2001-04-08 Thread Wade Halsey

Hi

Ive got a textarea control on a form where a user will enter info, i want to enter 
this info into an interbase db,ive limited the space to 200 characters in the text 
area but need to now eliminate any apostrophes and other bad characters, anyone have a 
function?

TIA

Wade



[PHP] syntax

2001-04-11 Thread Wade Halsey

Hi

I need to name a file like this
$fp=fopen('echo $agentcode' .'CyberTrac.ctr', "w");

the file gets named echo $agentcodeCyberTrac.ctr, now I want a real value in 
$agentcode, there is a value in there so it must be my syntax, anyone help?

TIA
Wade






[PHP] FTP Chron Mysql and PHP

2001-09-12 Thread Wade Berlin

I'm looking for a way to automatically ftp a tab-delimited text file from a
private ftp location and update my Mysql table every 24 hours.  I don't have
root access to the php/mysql server.  Anyone have an idea?



Thanks,

Wade Berlin, Backstreet Production Group Inc.

--
Backstreet Production Group..www.bpweb.com
904.398.8730(fax) 904.396.0335
--



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




Re: [PHP] Pricing for PHP programming???

2001-02-02 Thread Wade D

So how do you know what to charge when youre independent and just starting?


_
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] Fixing timezone issues

2002-08-13 Thread H. Wade Minter

At some point recently, PHP/Apache running on FreeBSD decided that i'm on
GMT, instead of EST5EDT.  The system date is correct:

bash-2.05a# date
Tue Aug 13 14:39:37 EDT 2002

But phpinfo() shows me:

_ENV["TZ"]  GMT

What's the best way to get PHP thinking I'm in eastern time again?

Thanks,
Wade



-- 
If you have a VCR or MP3 player, you need to read these links:

http://www.digitalconsumer.org/
http://digitalspeech.org/
http://www.libertyboard.org/


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




Re: [PHP] Fixing timezone issues

2002-08-13 Thread H. Wade Minter

On Tue, 13 Aug 2002, Rasmus Lerdorf wrote:

> Fix your Apache startup environment so TZ is set correctly.

I've got this in the apache startup script, but it's still on GMT:


bash-2.05a# head /usr/local/etc/rc.d/apache.sh
#!/bin/sh

TZ="EST5EDT"; export TZ

case "$1" in
start)
[ -x /usr/local/sbin/apachectl ] && /usr/local/sbin/apachectl
startssl > /dev/null && echo -n ' apache'
;;
stop)
[ -r /var/run/httpd.pid ] && /usr/local/sbin/apachectl stop >
/dev/null && echo -n ' apache'

-- 
If you have a VCR or MP3 player, you need to read these links:

http://www.digitalconsumer.org/
http://digitalspeech.org/
http://www.libertyboard.org/


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




[PHP] Postgres pconnect

2001-01-17 Thread H. Wade Minter

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I have a website where each new page access connects to a Postgres
database to load information.  Each DB connect uses a $dblink=pg_connect()
to connect to the database.  I'd like to avoid the overhead with opening a
new connection with every page.

So, can I change all of the pg_connect calls to pg_pconnect call and have
the pages use persistent connections, or is there something more that
needs to be done?

- --Wade
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE6ZfSfX5y4ZKLK2pMRAkVBAKCznNSkCNX7CCZtnWSVKKMqmf7tSwCgiBez
q4vzBEFouHJ2ZvaLXvJGvdo=
=nNgn
-END PGP SIGNATURE-


-- 
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] Splitting at word count

2001-01-25 Thread H. Wade Minter

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I'm doing a page where the front page will show "news" stories.  What I'd
like is if the story is longer than X words/chars/etc, the index page will
show the first X words, then a link for the full story.

Does anyone have a good idea on how to split after a certain number of
words?

Thanks,
Wade
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE6cIdgX5y4ZKLK2pMRAjOoAJ0RD43TCH7yVTLKhVjtsJ2mr/ZLMgCgmcz0
QHiQipt8ngHq7dnVdiQeHXY=
=PwwQ
-END PGP SIGNATURE-


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




RE: [PHP] phpinfo ?

2001-01-26 Thread H. Wade Minter

That's incorrect, at least under PHP4.  I've got the following file that
does the phpinfo stuff perfectly:

 BEGIN FILE

 END FILE

On Fri, 26 Jan 2001, John Guynn wrote:

> Actually what you need is  otherwise you're never
> going to get anything on the screen.
>
> John Guynn
>
> This email brought to you by RFCs 821 and 1225.
>
>
> -Original Message-
> From: Robert Collins [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 26, 2001 3:30 PM
> To: kaab kaoutar; [EMAIL PROTECTED]
> Subject: RE: [PHP] phpinfo ?
>
>
> looks like you forgot the semi-colon (;) at the end of phpinfo();
>
> Robert W. Collins
> [snip]
> - Original Message -
> From: "kaab kaoutar" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, January 26, 2001 10:23 AM
> Subject: [PHP] phpinfo ?
>
>
> > Hi there!
> >
> > I'm sure it's a stupid problem but the phpinfo does work while trying the
> > following html code:
> >
> > PHP Test
> > 
> > 
> >
> > 
> >
> > the result is a blank page!
> [snip]
>
> --
> 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]