[PHP] Re: PHP & MySQL "Move"

2003-03-03 Thread John Taylor-Johnston
Found this for anyone interested. http://www.mysql.com/doc/en/INSERT_SELECT.html John Taylor-Johnston wrote: > I was wondering about this, but decided to ask first first: > > INSERT INTO ccl.ccl_main VALUES (select * from greid.ccl where id=28); > delete * from greid.ccl where id=28; > > Both tab

[PHP] FW: [mysql]help with displaying table {off subject}#3

2003-03-03 Thread Karl James
Sorry about the html. I forgot to turn it off.. ultimatefootballleague.com/index.php [EMAIL PROTECTED] -Original Message- From: Karl James [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 04, 2003 2:29 AM To: '[EMAIL PROTECTED]' Subject: [mysql]help with displaying table {off subject}#2

[PHP] [mysql]help with displaying table {off subject}#2

2003-03-03 Thread Karl James
Title: Message hey guys just wanted to know as usual it was user error i had thought i had something stored in the tables but apparently i did not.   i apologize for the noobie question.   thanks   special thanks to jason. ultimatefootballleague.com/index.php [EMAIL PROTECTED]  

Re: [PHP] [mysq] help with displaying table {off Subject}

2003-03-03 Thread Petre Agenbag
I presume you are talking about phpMyAdmin here. The Browse link only works when there are entries in the tables, ie., it won't work on empty table. You must first insert data into the tables, and for that you uise the INSERT link. You can change the tables by using the PROPERTIES link. On Tue,

[PHP] [mysq] help with displaying table {off Subject}

2003-03-03 Thread Karl James
hey guys im trying to figure out why the browse link wont work in mysql is there anything special to edit so that i can view the tables so i can edit them and add value ultimatefootballleague.com/index.php [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscri

[PHP] entrycheck

2003-03-03 Thread Diksha Neel
HI EVERYBODY, WHEN I RUN MY PHP SCRIPT TYPED BELOW, I GET 'connected successfully query failed'. i have in bdoi_change database a table called entry with 2 fields: login and pass in which i have put some data. can anyone help out? regards, diksha. I HAVE AN HTML FORM BY NAME entry.html the cod

RE: [PHP] Getting Numerical Index of a Key

2003-03-03 Thread Matt Honeycutt
Bad design, basically. This script is creating the array, then modifying a certain value in it using the text key. Later, it's referring to each value in the array by numerical index. Apparently, the text key and the numerical index do not refer to the same values in PHP, so the value it's refer

Re: [PHP] Using PHP to Generate a CSS Style Sheet

2003-03-03 Thread Leif K-Brooks
It doesn't have to be a .css file, just as HTML generated from PHP doesn't have to have a .html extension. Phillip S. Baker wrote: Greetings all, I would like to use PHP to make calls from a DB and generate a CSS file. Anyone have any ideas on doing this? Will php commands executre from a .css

Re: [PHP] Getting Numerical Index of a Key

2003-03-03 Thread Leif K-Brooks
No, there's no easy way to do this. Just out of curiousity, why do you want to do this anyway? Matt Honeycutt wrote: Because I created it with mysql_fetch_array(). I know for a fact that both keys exist, and I can look at the output and tell what text key matches to what numerical key, but I d

[PHP] Using PHP to Generate a CSS Style Sheet

2003-03-03 Thread Phillip S. Baker
Greetings all, I would like to use PHP to make calls from a DB and generate a CSS file. Anyone have any ideas on doing this? Will php commands executre from a .css file or is there a different way to do this?? Blessings Phillip +++ IMPORTANT: Thi

RE: [PHP] Getting Numerical Index of a Key

2003-03-03 Thread Matt Honeycutt
Because I created it with mysql_fetch_array(). I know for a fact that both keys exist, and I can look at the output and tell what text key matches to what numerical key, but I don't want to hardcode it like that. The people that are taking over this code might change something and screw everythin

Re: [PHP] Getting Numerical Index of a Key

2003-03-03 Thread Leif K-Brooks
What makes you think it HAS a numerical index? Matt Honeycutt wrote: Is there an easy way to get the numerical index of a text key for an array? I don't see anything in the manual, but before I waste time writing code to find this info, I thought I would double check here. ---Matt -- The abo

[PHP] Getting Numerical Index of a Key

2003-03-03 Thread Matt Honeycutt
Is there an easy way to get the numerical index of a text key for an array? I don't see anything in the manual, but before I waste time writing code to find this info, I thought I would double check here. ---Matt

[PHP] Re: Still no luck running a PHPCLI script from CRON -- getting closer

2003-03-03 Thread Tom Rogers
Hi, Tuesday, March 4, 2003, 2:58:50 PM, you wrote: JMC> I have my PHP script running from cron now as root, but when I try to JMC> run it as a non root user it doesn't work. When I drop down to the non JMC> root user and run the script by hand I get this. JMC> /usr/libexec/ld-elf.so.1: Shared ob

[PHP] pharse file random work with -n lines

2003-03-03 Thread WebDev
how can you return this randomized? how can I get every time I call this function a random set of lines ? Working Code to read 10 first lines and split the individual line into info careeners and do something with it $i = 0; $fp = fopen ("../../../../../public/httpd/html/datacon

[PHP] Re: dealing with dates

2003-03-03 Thread KK
you should make the column for the time posted in your table to be Date/time. mysql stores it in this format: 2003-02-24 12:43:45 (year-month-day hours:minutes:seconds) to allow the current date/time to be inserted into this column date("Y-m-d G:i:s") if you want to DISPLAY it in this date format

[PHP] Re: mail function works, but always from nobody@localhost!

2003-03-03 Thread KK
add an extra variable to your mail function. php takes an optional 4th parameter, which adds features like "From" and "Reply". example: $extra = "From: $name <$email>\r\n\Reply-To: $email"; so the mail function would be: mail($recipient,$subject,$body,$extra); Hope this helped. "Ml" <[EMAIL PRO

[PHP] mail function works, but always from nobody@localhost!

2003-03-03 Thread ML
How exactly would I go about fixing my current php/sendmail setup so that it uses the value specified in my php input form in the from box instead of always setting the email from address as : [EMAIL PROTECTED] ??? Any help would be greatly appreciated. Thanks! -- PHP General Mailing List (htt

[PHP] Still no luck running a PHPCLI script from CRON -- getting closer

2003-03-03 Thread Justin Michael Couto
I have my PHP script running from cron now as root, but when I try to run it as a non root user it doesn't work. When I drop down to the non root user and run the script by hand I get this. /usr/libexec/ld-elf.so.1: Shared object "libmysqlclient.so.12" not found any ideas why this wouldn't not h

Re: Re[2]: [PHP] ICQ # validation

2003-03-03 Thread Leo Spalteholz
On March 3, 2003 06:31 pm, Tom Rogers wrote: > Hi, > > Tuesday, March 4, 2003, 12:06:14 PM, you wrote: > JF> Does it actually NEED a regexp? > > JF> UNTESTED code: > JF> JF> $icq = 2264532680; > JF> if( (is_int($icq)) && (strlen($icq) > 7) && (strlen($icq) < 9) > ) { JF> echo "yah"; > JF> } el

[PHP] dealing with dates

2003-03-03 Thread Charles Kline
Hi all, I posted earlier with some date questions, but realized I could probably do better with my question presented as such. I need to save the time date and time of posting for the records in a table. I then need to be able to search via a startdate and enddate text field where the user wil

Re: [PHP] Yarrrrgggghhhhh || Simplest php question in existence........

2003-03-03 Thread Larry E. Ullman
Any performance issues re: using fetch_row vs. fetch_array? No significant performance issues. If you want to be precise and save a little overhead, use $row = mysql_fetch_array ($result, MYSQL_ASSOC); The returned record will ONLY be returned as an associative array. Larry -- PHP General Maili

Re: [PHP] Yarrrrgggghhhhh || Simplest php question in existence........

2003-03-03 Thread Leif K-Brooks
According to the manual, "An important thing to note is that using mysql_fetch_array() is not significantly slower than using mysql_fetch_row() , while it provides a significant added value." Noah wrote: You're on a roll. Any perform

Re: [PHP] Update MD5 Field

2003-03-03 Thread Leif K-Brooks
Run the following SQL query: update TABLE set code = md5(concat(name,email)) Dani Matielo wrote: Hello, everybody my problem is the following: I just imported a csv file to a MySQL database that contains name and email fields. It has about 9k lines on it and I need a new field that orinally didn'

[PHP] Update MD5 Field

2003-03-03 Thread Dani Matielo
Hello, everybody my problem is the following: I just imported a csv file to a MySQL database that contains name and email fields. It has about 9k lines on it and I need a new field that orinally didn't exist called "code" thats suposed to be MD5(name.email) I know how to do this for new data, bu

Re: [PHP] Yarrrrgggghhhhh || Simplest php question in existence........

2003-03-03 Thread Noah
You're on a roll. Any performance issues re: using fetch_row vs. fetch_array? Thanks again, --Noah - Original Message - From: "Leif K-Brooks" <[EMAIL PROTECTED]> To: "CF High" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, March 03, 2003 7:04 PM Subject: Re: [PHP] Yah

Re[2]: [PHP] ICQ # validation

2003-03-03 Thread Tom Rogers
Hi, Tuesday, March 4, 2003, 12:06:14 PM, you wrote: JF> Does it actually NEED a regexp? JF> UNTESTED code: JF> $icq = 2264532680; JF> if( (is_int($icq)) && (strlen($icq) > 7) && (strlen($icq) < 9) ) { JF> echo "yah"; JF> } else { JF> echo "nah"; JF> } ?>> JF> FWIW, Are you SURE that all

Re[2]: [PHP] Still no luck running a PHPCLI script from CRON

2003-03-03 Thread Tom Rogers
Hi, Tuesday, March 4, 2003, 10:01:25 AM, you wrote: JMC> Dan, JMC> I used your example exactly like you have it specified. My cron log JMC> looks like this: JMC> Mar 3 15:53:00 prod /usr/sbin/cron[3085]: (root) CMD JMC> (/usr/local/contab-scripts/wibble.php) JMC> Mar 3 15:54:00 prod /usr/sbi

Re: [PHP] Yarrrrgggghhhhh || Simplest php question in existence........

2003-03-03 Thread Joel Colombo
not mysql_fetch_array unless u need those int indexes. mysql_fetch_assoc is the same thing but does not index the integer value, just the string field name. Joel "Leif K-Brooks" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Use mysql_fetch_array instead of mysql_fetch_row. > > CF

[PHP] Re: Yarrrrgggghhhhh || Simplest php question in existence........

2003-03-03 Thread Joel Colombo
query result like MYSQL ? $x = mysql_result($result, 0, 'field'); another way for mysql_result $r = mysql_fetch_assoc($result); $value = $r['fieldname']; -- OR -- just an array ? $result['fieldname'] = 5; $x = 'fieldname'; echo ($result[$x]); did that help ? i think i

Re: [PHP] Yarrrrgggghhhhh || Simplest php question in existence........

2003-03-03 Thread Leif K-Brooks
Use mysql_fetch_array instead of mysql_fetch_row. CF High wrote: Hey all. Basic question here: How can I refer to a query result set as $result['field_name'] rather than $result[0]? So, I'm looking for -- just can't seem to get the right syntax. -- clueless -- -- The above message is

[PHP] Yarrrrgggghhhhh || Simplest php question in existence........

2003-03-03 Thread CF High
Hey all. Basic question here: How can I refer to a query result set as $result['field_name'] rather than $result[0]? So, I'm looking for -- just can't seem to get the right syntax. -- clueless -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.ne

Re: [PHP] Populate var with function output string?

2003-03-03 Thread Noah
You da man, Leif. That did the trick. Didn't try the output buffering idea. I need to look into that area. Thanks for illuminating things a bit --Noah - Original Message - From: "Leif K-Brooks" <[EMAIL PROTECTED]> To: "CF High" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> S

Re: [PHP] ICQ # validation

2003-03-03 Thread Justin French
Does it actually NEED a regexp? UNTESTED code: 7) && (strlen($icq) < 9) ) { echo "yah"; } else { echo "nah"; } ?> FWIW, Are you SURE that all valid ICQ #'s are between 7 and 9 chars? Surely at some point they'll reach 10 chars, and *may* have started at 6? Justin on 04/03/03 6:00 AM

Re: [PHP] preg_match_all()

2003-03-03 Thread Michael Sims
On Mon, 3 Mar 2003 19:51:09 -0500, you wrote: >preg_match_all('/begincommand(.*)endcommand/',$messagebody,$commandOuttake,P >REG_PATTERN_ORDER); [...] > How >do I change the criteria to stop at the first instance of a match? How do I >parse out only up to the first instance of "endcommand"? Here

Re: [PHP] Populate var with function output string?

2003-03-03 Thread Ernest E Vogelsinger
At 04:56 04.03.2003, CF High said: [snip] >Hey all. > >Is it possible to populate a var with an output string generated by a >function? So: > >*** >function write_string(count) { > >for ($x = 0; $x < $count; $x++) { > >

RE: [PHP] working with file and mail

2003-03-03 Thread John W. Holmes
Care to enlighten us as to what the problem was? Inquiring minds want to know. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ > -Original Message- > From: WebDev [mailto:[EMAIL PROTECTED] > Sent: Monday, March

RE: [PHP] date range assistance needed

2003-03-03 Thread John W. Holmes
What does $qAnnouncement look like if you echo it out? Does it look correct? Are you sure the variables you're passing to strtotime() are correct? What does mysql_error() say after you run this query? ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy to

RE: [PHP] preg_match_all()

2003-03-03 Thread John W. Holmes
Use a U modifier in your pattern. http://www.php.net/manual/en/pcre.pattern.modifiers.php ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ > -Original Message- > From: Vania Smrkovski [mailto:[EMAIL PROTECTED] >

RE: [PHP] Populate var with function output string?

2003-03-03 Thread David Freeman
> *** > function write_string(count) { > > for ($x = 0; $x < $count; $x++) { > > echo " Row $x"; > > } > > } > > $my_string = write_string(5); > > echo $my_string; > *** 8<-Untested Code-8<- f

Re: [PHP] Populate var with function output string?

2003-03-03 Thread Leif K-Brooks
Try adding each output string to a variable, then returning it, like: function return_string(count) { $return = ''; for ($x = 0; $x < $count; $x++) { $return.= " Row $x"; } return $return; } If you can't do that for some reason, try using output buffering. www.php.net/ob-sta

[PHP] Populate var with function output string?

2003-03-03 Thread CF High
Hey all. Is it possible to populate a var with an output string generated by a function? So: *** function write_string(count) { for ($x = 0; $x < $count; $x++) { echo " Row $x"; } } $my_string = write_string(5); echo $my_string; *

[PHP] preg_match_all()

2003-03-03 Thread Vania Smrkovski
As described in http://www.php.net/manual/en/function.preg-match-all.php, I have put in place a bit of code theoretically designed to parse out snippets of text embraced with an open and close tag. The code I am using is this: preg_match_all('/begincommand(.*)endcommand/',$messagebody,$commandOut

Re: [PHP] query strings(still broken)

2003-03-03 Thread Leif K-Brooks
Do you mind giving (some of) your code? Sunfire wrote: still broke - Original Message - From: "Leif K-Brooks" <[EMAIL PROTECTED]> To: "Sunfire" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, March 03, 2003 7:18 PM Subject: Re: [PHP] query strings(still broken) Are you tryin

[PHP] Re: Run db query with db query?

2003-03-03 Thread CF High
Exactly. I'm using $result for both queries. That's how I discovered the problem: the inner query is over-writing the outer query $result set. Unfortunately my existing db_connect function does not account for multiple queries. I just pass the query as a param -- db_connect($sql). $result is r

[PHP] Re: Code Validator

2003-03-03 Thread Niels Andersen
PHP is not text markup, it is a kind of programming language. You can't just validate code for "correctness", only for valid syntax. It may still contain bugs. The syntax is checked by the parser, which is invoked when you run your script. Regarding HTML-output from your script, you can make sure

RE: [PHP] quick echo output

2003-03-03 Thread Rich Gray
> Ok most all programs I see they use > within the html. > Now I have always used the shortened version Is > there a reason > why I should not use this? I've never had any problems with this way of > doing things, but I just don't see anyone else using that format.. I think it's because the '=$

Re: [PHP] query strings(still broken)

2003-03-03 Thread Evan Nemerson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 // UNTESTED $tArr = explode('&',$QUERY_STRING); foreach ( $tArr as $tVar ) { $a = explode('=',$tVar); ${rawurldecode($a[0])} = rawurldecode($a[1]); } ??? On Monday 03 March 2003 04:17 pm, Sunfire wrote: > tried everything except ses

[PHP] Re: query strings(still broken)

2003-03-03 Thread Niels Andersen
So when you do request for: your_script.php?var=hello%20world And put this in your script you get hello%20world printed? "Sunfire" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > tried everything except session vars and the query string is still broken... > no matter what i do for

Re: [PHP] quick echo output

2003-03-03 Thread Evan Nemerson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 "There are four sets of tags which can be used to denote blocks of PHP code. Of these, only two ( and . . .) are always available; the others can be turned on or off from the php.ini configuration file. While the short- form tags and ASP-style tags

Re: [PHP] query strings(still broken)

2003-03-03 Thread Leif K-Brooks
Are you trying to look at the query string itself? If so, spaces are invalid in URLs, so they are urlencoded. Try using $_GET/$HTTP_GET_VARS, or urldecode() it if you must. Sunfire wrote: tried everything except session vars and the query string is still broken... no matter what i do for some

[PHP] Re: Problems posting

2003-03-03 Thread Niels Andersen
Actually, I did not check the time. But I was online for more than 10 minutes and pressed my refresh button sevaral times. My post did not appear. "Henry Grech-Cini" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Did you send this post at 17:17 and did it arrive at 17:22? > > "Niels

RE: [PHP] deciperhing oop

2003-03-03 Thread Larry Brown
Thank you everyone for helping. I didn't know you have to put $this-> in front of all variables in the class. You learn something new every day ( I thought you only needed to use that once to make the variable available everywhere in the class up till now). Larry S. Brown Dimension Networks, Inc

[PHP] query strings(still broken)

2003-03-03 Thread Sunfire
tried everything except session vars and the query string is still broken... no matter what i do for some reason the browser wants to always put %20 in the middle of my words (i.e. hello world as one var will come out as hello%20world) any other ideas --- Outgoing mail is certified Virus Free.

RE: [PHP] Still no luck running a PHPCLI script from CRON

2003-03-03 Thread Justin Michael Couto
Dan, I used your example exactly like you have it specified. My cron log looks like this: Mar 3 15:53:00 prod /usr/sbin/cron[3085]: (root) CMD (/usr/local/contab-scripts/wibble.php) Mar 3 15:54:00 prod /usr/sbin/cron[3085]: (root) CMD (/usr/local/contab-scripts/wibble.php) However, it does n

Re: [PHP] Code Validator

2003-03-03 Thread Justin French
You need to validate the RESULT of the HTML/PHP source being processed by PHP, resulting in pure HTML source, which is what your browser sees. So, upload your pages to a server which can be accessed over the internet, then go to somewhere like validator.w3.org, enter the URL, and it will validate

[PHP] MySQL and phpMyAdmin Issues

2003-03-03 Thread Stephen Craton
Hello, Yesturday I made a big mistake. I had to import a 60MB file into a database and I used ssh. I'm very unfamiliar with it and when I connected to the MySQL connection thing, I forgot to switch databases when I imported. This overwrite (I don't know why but it did) the users table in the mysql

[PHP] Re: date range assistance needed

2003-03-03 Thread Bobby Patel
I believe PHP and MySQL use two different definitions of the start of a time stamp. One uses 1974 the other 1900 (I don't know exactly). If you echo strtotime($attributes[startdate]) , UNIX_TIMESTAMP (datestamp) Also, in your query you are looking for all headlines that have strtotime($attributes

Re: [PHP] deciperhing oop

2003-03-03 Thread Jim Lucas
the second argument in the mysql_select_db call in not in scope. you should be using $this->db instead of $db Jim - Original Message - From: "Larry Brown" <[EMAIL PROTECTED]> To: "PHP List" <[EMAIL PROTECTED]> Sent: Monday, March 03, 2003 2:52 PM Subject: [PHP] deciperhing oop > Can som

[PHP] quick echo output

2003-03-03 Thread Richard Baskett
Ok most all programs I see they use within the html. Now I have always used the shortened version Is there a reason why I should not use this? I've never had any problems with this way of doing things, but I just don't see anyone else using that format.. Cheers! Rick "As I grow to understand

[PHP] date range assistance needed

2003-03-03 Thread charles kline
Here is my current query: $qAnnouncement = 'SELECT id,headline FROM tbl_funding WHERE 1 AND ((UNIX_TIMESTAMP (datestamp) >= ' . strtotime($attributes[startdate]) . ') AND (UNIX_TIMESTAMP (datestamp) <= ' . strtotime($attributes[startdate]) . ')) LIMIT 0, 30'; Where datestamp is set in MySQL wi

Re: [PHP] working with file and mail

2003-03-03 Thread WebDev
Ok I got it figuered please do not reply to this subject anymore Thank you all who helped - Original Message - From: Kevin Stone <[EMAIL PROTECTED]> To: WebDev <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, March 03, 2003 1:56 PM Subject: Re: [PHP] working with file and mail >

[PHP] Re: deciperhing oop

2003-03-03 Thread Philip Hallstrom
Haven't evaluated the below thouroughly, but in your setDBase() function be sure to use $this->db instead of $db (which is undefined). -philip On Mon, 3 Mar 2003, Larry Brown wrote: > Can someone who is used to using php oop help me figure out why this fails? > I know there are probably a thousa

Re: [PHP] Code Validator

2003-03-03 Thread Leif K-Brooks
Exactly what do you mean by code validator? If you can run it and it doesn't return any errors... it's valid PHP! :) If you mean one that validates HTML produced by PHP, try saving the output of the PHP script and validating that. Beauford.2002 wrote: Hi, Is there a code validater for HTML/

[PHP] Code Validator

2003-03-03 Thread Beauford.2002
Hi, Is there a code validater for HTML/PHP. I have one for just HTML, but once you introduce PHP it doesn't work. TIA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] deciperhing oop

2003-03-03 Thread Larry Brown
Can someone who is used to using php oop help me figure out why this fails? I know there are probably a thousand classes already designed to do this and probably 100 times more efficient, but this is how I learn. From what I've read this should work but there is obviously something I'm missing. Q

[PHP] Re: functions and

2003-03-03 Thread Monty
You can't call a PHP function directly from an HTML tag. You'll instead need to do something like this: Then create a logout.php file that has your logout code. > From: [EMAIL PROTECTED] (Martin Johansson) > Newsgroups: php.general > Date: Mon, 3 Mar 2003 23:32:16 +0100 > To: [EMAIL PROTEC

[PHP] Re: Run db query with db query?

2003-03-03 Thread Monty
What is the code for the inner query? Hard to advise you based on the small bit of code you posted. Are you using the same $result var for both queries? If so, that's why. Just run two separate queries stored in to different result vars. I do this all the time with no problems. > From: [EMAIL PR

Re: [PHP] Re: functions and

2003-03-03 Thread Martin Johansson
it logs somone out of a session.. "Ray" <[EMAIL PROTECTED]> skrev i meddelandet news:[EMAIL PROTECTED] does the function logout() log someone out of a session, or does it return the url for where they go to logout? and what about it isn't working? On Monday 03 March 2003 16:32, you wrote: > Ok t

Re: [PHP] Re: functions and

2003-03-03 Thread Leif K-Brooks
PHP is server-side, the PHP script has already executed by the time the client sees your output. Try having the logout link call a page that calls the function. Martin Johansson wrote: Ok to make it simplier, this is what I wanna do! echo "Logout"; function logout() { . } ?> How do I

Re: [PHP] Re: functions and

2003-03-03 Thread Ray
does the function logout() log someone out of a session, or does it return the url for where they go to logout? and what about it isn't working? On Monday 03 March 2003 16:32, you wrote: > Ok to make it simplier, this is what I wanna do! > > > echo "Logout"; > > function logout() > { > . >

[PHP] PHP & Majordomo -- front end or reporting tools?

2003-03-03 Thread J J
I'm looking for something possibly already done in PHP to manage majordomo mailing lists. Also, if there's a way to read some log files and do some reporting ie: - how many messages sent - how many bounced etc Is this possible with PHP or does anyone know of a sample like this to get started?

[PHP] Re: functions and

2003-03-03 Thread Martin Johansson
Ok to make it simplier, this is what I wanna do! Logout"; function logout() { . } ?> How do I do it!!! /M > Hi > I want to call a function logout() inside an statement: > > \">logout > > function logout() > { > > } > ?> > > but this doesnt work.. how shall I do it > /M > > -- P

[PHP] functions and

2003-03-03 Thread Martin Johansson
Hi I want to call a function logout() inside an statement: \">logout but this doesnt work.. how shall I do it /M -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] working with file and mail

2003-03-03 Thread WebDev
I just got it working with this following code and again the problem the first person in the list gets a perfect email, 2 person will see the first person emailed in the list and so on the third sees the 2 and 1 I got 1000 entries in the file and it is unexceptable to let person nr. 800 see

Re: [PHP] $PHP_SELF with redirected domain

2003-03-03 Thread bill
Thanks Chris for your thoughts, but no success yet. Details interspersed below Chris Hayes wrote: > ...and the problem that the form immediately goes to the real url is that > people see the real url? No, the problem is that the URLs don't match. The browser does accurately find the page, etc.

Re: [PHP] working with file and mail

2003-03-03 Thread Kevin Stone
Impossible. The list() = split() construct will initialize any variables that do not contain values so it cannot possibly be a security risk. User 100 cannot possibly see user 99's email address unless user 99's email address is on line 100. If you want to be absolutely certain then initialize y

Fw: [PHP] Run db query with db query?

2003-03-03 Thread Kevin Stone
You don't have to use the same variable name to store the second results pointer. $resulta = mysql_query(); whle ($row = mysql_fetch_row($resulta)) { $resultb = mysql_query(); while ($row = mysql_fetch_row($resultb)) { } } - Kevin - Original Message - From: "CF High" <[

[PHP] PHP reading wrong Linux folder

2003-03-03 Thread Matthew
Hello! I'm running PHP 4.2.3 on a Linux web-hosting server. Right now I am trying to work with a PHP script (MLM Multi List Manager, in case it matters) to handle mailing lists. It works terrific on one server, but on another one it has a very strange problem that I was hoping someone would kno

[PHP] Run db query with db query?

2003-03-03 Thread CF High
Hey all. Got a problem here: 1) I have a page that queries our db for info 2) Based on the # of rows returned I loop through to create a set of formfields for each customer 3) Within this loop I run another query to retrieve option elements for a particular category The problem is

[PHP] working with file and mail

2003-03-03 Thread WebDev
Hello all I hat some help last night from John Holmes but I am still stuck with even more option in the code My Problem: I have a text data file of users I wish to email all with custom information from the file, each line represents a user with 21 seperated datafields ( serperator "|" ) ...

[PHP] Re: post xml file

2003-03-03 Thread qt
Dear Sirs, I try to post xml file with following script; Until today I was using following script for http post. But now I shoul post https. When I changing HTTP to HTTPS, I am getting this error Bad Request HTTP/1.1 400 Bad Request Date: Mon, 03 Mar 2003 21:07:18 GMT Server: Apache/1.3.27 (Unix

[PHP] RE: RE: Bitwise operator question

2003-03-03 Thread Philip Hallstrom
Yes... it is the | operator that is doing it. >From the man pages: $a & $b And Bits that are set in both $a and $b are set. $a | $b Or Bits that are set in either $a or $b are set. So, let's say: $a = 5; # 0101 $b = 3; # 0011 Then: $a & $b 0101 & 0011 = 0001 (1) and $a | $b 0101 & 00

RE: [PHP] RE: Bitwise operator question

2003-03-03 Thread Dan Sabo
Thanks Philip, OK I understand the binary thing but that line, I just don't see it, It's not the or operator that's summing up the two binary values is it? Dan -Original Message- From: Philip Hallstrom [mailto:[EMAIL PROTECTED] Sent: Monday, March 03, 2003 3:53 PM To: Dan Sabo Cc: [EMAIL

[PHP] Re: query strings

2003-03-03 Thread Philip Hallstrom
Spaces usually get converted to %20 when passed around in urls... take a look at the urldecode() and parse_str() functions... http://www.php.net/manual/en/function.urldecode.php http://www.php.net/manual/en/function.parse-str.php On Mon, 3 Mar 2003, Sunfire wrote: > i have a might i say a very v

[PHP] RE: Bitwise operator question

2003-03-03 Thread Philip Hallstrom
Yes. Oops. -philip On Mon, 3 Mar 2003, Dan Sabo wrote: > Hi Phillip, > > Don't U mean > > 0001 > | 0100 > = 0101 > > ? > > Dan > > -Original Message- > From: Philip Hallstrom [mailto:[EMAIL PROTECTED] > Sent: Monday, March 03, 2003 2:33 PM > To: Dan Sabo > Cc: [EMAIL PROTE

Re: [PHP] Help with SQL statement

2003-03-03 Thread David Otton
On Mon, 03 Mar 2003 12:04:37 -0800, you wrote: >I have a database that holds a start date and an end date and I have a form >with a start date and an end date. The report would be to get everything in >the database's date ranges that overlap the form's date range. I am having >trouble figuring out

[PHP] query strings

2003-03-03 Thread Sunfire
i have a might i say a very very large/long query string i have to run to pass variable values from one page to another with a button... the button works and the query string are passing variables right but at the end of the query string (it passes like 21 variable values) the last variable content

[PHP] Re: All Code Executing Even After header() Redirect

2003-03-03 Thread Bobby Patel
Add an exit statement after the header call. But I thought the same thing that after header nothing would be executed. if (!LoggedIn()) { // If not logged in, take to Login page. header("Location: /login.php"); exit(); } I just gave you this soultion to solve your prob

Re: [PHP] All Code Executing Even After header() Redirect

2003-03-03 Thread David Otton
On Mon, 03 Mar 2003 14:50:00 -0500, you wrote: >I thought the code below the header() redirect would not actually be >executed unless the user was logged in and allowed to proceed. Is this how >PHP is supposed to work? Is there any way to prevent the script from header() isn't a goto - it just ou

[PHP] Help with SQL statement

2003-03-03 Thread Sarah Heffron
I have a database that holds a start date and an end date and I have a form with a start date and an end date. The report would be to get everything in the database's date ranges that overlap the form's date range. I am having trouble figuring out how to get this to work, any help is appreciated.

[PHP] All Code Executing Even After header() Redirect

2003-03-03 Thread Monty
At the top of every page in my site I have a snippet of code that authenticates the user by checking for valid SESSION vars and their contents. If they don't, they are redirected with a header() statement to a log-in page like this: include_once("function_library.php"); session_start();

[PHP] RE: Bitwise operator question

2003-03-03 Thread Dan Sabo
Hi Phillip, Don't U mean 0001 | 0100 = 0101 ? Dan -Original Message- From: Philip Hallstrom [mailto:[EMAIL PROTECTED] Sent: Monday, March 03, 2003 2:33 PM To: Dan Sabo Cc: [EMAIL PROTECTED] Subject: Re: Bitwise operator question Here's how I think about it... CRE

[PHP] Re: Bitwise operator question

2003-03-03 Thread Philip Hallstrom
Here's how I think about it... CREATE_RECORDS = 1 in decimal and 0001 in binary. ALTER_RECORDS = 4 in decimal and 0101 in binary. that line returns a binary string where *any* of the bits are 1, so line them up: 0001 | 0101 = 0101 which is 5. On Mon, 3 Mar 2003, Dan Sabo wrote: > Hi, > >

[PHP] Bitwise operator question

2003-03-03 Thread Dan Sabo
Hi, I'm reading the description of Bitwise Operators on page 81 of "Professional PHP 4", the Wrox book. In the highlighted example on that page, the line of code... $user_permissions = CREATE_RECORDS | ALTER_RECORDS; the description in the book says that this line is building a set of user perm

Re: [PHP] News Content

2003-03-03 Thread David Otton
On Mon, 03 Mar 2003 13:09:39 -0500, you wrote: >Anyone know of any pre-built modules or whatnot that provide some news >content and/or links and captions via PHP/MySQL that can be integrated with >minimal disruption to a site? (A prerequisite being that it acts legally in >terms of gathering t

Re: [PHP] ICQ # validation

2003-03-03 Thread David Otton
On Mon, 3 Mar 2003 14:00:43 -0500, you wrote: >Maybe I'm off my rocker, but I don't see how this can't work. I'm trying to validate >an ICQ number, and assuming a valid one is between 7 and 9 numbers. My line of code >is this: > >if(ereg("^[0-9]{7,9}$", $_REQUEST["icqnumber"])) { >print("a-o

Re: [PHP] ICQ # validation

2003-03-03 Thread 1LT John W. Holmes
Use single quotes around your pattern. if(ereg('^[0-9]{7,9}$',... With the double quotes, PHP is probably seeing the $ and looking for a variable, even though it's at the end of the string. ---John Holmes... - Original Message - From: "Liam Gibbs" <[EMAIL PROTECTED]> To: <[EMAIL PROTECT

[PHP] max_execution_time and set_time_limit() problem.

2003-03-03 Thread Eric Wood
I'm uploading a large file through my web page and after 30 seconds, the fails with an error. I bumbed the max_execution_time parameter in /etc/php.ini to 600 seconds and restarted apache. Still errors at 30 seconds. I added set_time_limit(600); to various place in my file upload handling scrip

[PHP] Re: PHP shopping carts

2003-03-03 Thread Henry Grech-Cini
Hi, Please let me know if you find one thats any good? Henry "Dan Sabo" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > What I'm looking for is either an open source or commercial solution which > is supported by either commercial or OS add on modules. I've looked at OS >

  1   2   >