Re: [PHP] Include Part 2

2002-09-28 Thread Chris Shiflett
Chuck PUP Payne wrote: >By the way I have time this but what is happen and maybe this will clear up >things. > That certainly made things clear. :-) >I only calling this first myrow call titles. It's not going on to >the other two. Now in my php page I have this... > >$myrow = mysql_fetch_array

Re: [PHP] Include Part 2

2002-09-28 Thread Justin French
Is this to pull the rows out of a database?? You could start with a simple example, which is just a basic config setting, and use the $myrow array in your sql while loop to do a lot of the work. $value) { echo "{$key}: {$value}\n"; } echo "\n"; } ?> For the abov

Re: [PHP] Include Part 2

2002-09-28 Thread Chuck PUP Payne
By the way I have time this but what is happen and maybe this will clear up things. I only calling this first myrow call titles. It's not going on to the other two. Now in my php page I have this... $myrow = mysql_fetch_array($result); $row; Now this doesn't work. But this does. $myrow = mysql

[PHP] Problems with dbase_create function

2002-09-28 Thread Matt Neimeyer
Hey All, I'm trying to build a DBF for exporting selected data as a download to the end users... But I can't get further than this... error_reporting(E_ALL); $DBFName = "Test.dbf"; $Fields = array( array ("Test","C",32) ); if(dbase_create($DBFName, $Fields))

Re: [PHP] Include Part 2

2002-09-28 Thread Chuck PUP Payne
What I was wanting to do was store the myrows under let say, db_info.inc file. So that I can add or delete what myrows I want to call on. I am thinking this what I need to do... Function row ($row) { //These are the rows to call on... $title = $myrow[title]; $format = myrow[format];

RE: [PHP] Include Part 2

2002-09-28 Thread John W. Holmes
> -Original Message- > From: Chuck PUP Payne [mailto:[EMAIL PROTECTED]] > Sent: Sunday, September 29, 2002 1:29 AM > To: PHP General > Subject: [PHP] Include Part 2 > > Ok, I am trying to make my design a lot easier. I want to know if I can do > this... > > I want to set up in my php pag

Re: [PHP] Include...

2002-09-28 Thread John Hinton
Chuck \"PUP\" Payne wrote: >Hi, > >I am trying to start using inc files. But I am this this error > >Warning: Failed opening '/local/htdocs/movies/style.inc' for inclusion >(include_path='.:/usr/share/php') in /local/htdocs/movies/lmenu.php on line >3 > >I have this in my lmenu.php > >Include

RE: [PHP] Dear all

2002-09-28 Thread John W. Holmes
Do you know how to read? If so, please try your skills on the last line of any email you are getting from this listserve. In case you need help, you should try a regular expression and look for the line that begins with "To unsubscribe, visit:" For help with regular expressions, please see htt

RE: [PHP] John Holmes->Re: [PHP] Challenging problem for you programing gurus...

2002-09-28 Thread John W. Holmes
> Hey John, > Thanks for the reply, > Am a bit confused, 2 guys already gave me the advise you are giving me but > you also say > "CHANGE COLUMN old_column_name new_column_name" > why to change the column name? dont I only have to change it from being an > "int" to an "Auto_Increment"? Yes. That'

RE: [PHP] Help! Can't set cookie or redirect!!!

2002-09-28 Thread John W. Holmes
OK...if your error says you have output, then you have output. It's not lying to you. Your error was this: > > > Warning: Cannot add header information - headers already sent by > > (output > > > started at /users/ppowell/web/my/process.php:5) in > > > /users/ppowell/web/my/process.php on line 76

Re: [PHP] Include Part 2

2002-09-28 Thread Justin French
Not sure I fully understand, but usually this stuff calls for either a function, or an included file of code... in your case, sounds like a function is required, but I may not fully understand... Regards, Justin on 29/09/02 3:29 PM, Chuck PUP Payne ([EMAIL PROTECTED]) wrote: > Ok, I am trying

Re: [PHP] Posting a value to one form to another

2002-09-28 Thread Uma Shankari T.
Hello, On Sun, 29 Sep 2002, Chris Shiflett wrote: CS>Uma, CS> CS>I'm sorry, but I'm still confused. Maybe someone else better understands CS>your question. CS> CS>Given the following example script, delay.php: CS> CS>echo $_GET["hid"]; CS>?> CS> CS>A URL such as http://example.org/delay.php?hi

[PHP] Include Part 2

2002-09-28 Thread Chuck PUP Payne
Ok, I am trying to make my design a lot easier. I want to know if I can do this... I want to set up in my php page this... $rows; Under my db_info.inc I want to store this so that I can add delete from it. $row = "$title = myrow[title]; $format = myrow[format]; $category = myrow[category];"

Re: [PHP] Posting a value to one form to another

2002-09-28 Thread Chris Shiflett
Uma, I'm sorry, but I'm still confused. Maybe someone else better understands your question. Given the following example script, delay.php: A URL such as http://example.org/delay.php?hid=4 will output the following: 4 Are you saying this is not happening? This is what it sounds like you a

Re: [PHP] Posting a value to one form to another

2002-09-28 Thread Uma Shankari T.
Hello, CS> CS>So, you are saying your URL looks something like this: CS> CS>http://example.org/delay.php?hid=4 Yes..my url is look like this only.. CS> CS>And, when you output the value of $_GET["hid"], it outputs 3? CS> But in the url the value are getting incremented and it is displaying t

Re: [PHP] Posting a value to one form to another

2002-09-28 Thread Chris Shiflett
Uma, So, you are saying your URL looks something like this: http://example.org/delay.php?hid=4 And, when you output the value of $_GET["hid"], it outputs 3? Uma Shankari T. wrote: >Actually it is displaying in the url bar correctly with the >incremented $hid value..but displaying the result

Re: [PHP] Posting a value to one form to another

2002-09-28 Thread Uma Shankari T.
Hello, On Sun, 29 Sep 2002, Sascha Cunz wrote: SC>Oops, of course you must add one to it, too. like: SC> SC> Still it is incrementing but not fetching the value correspond from the database..In linux paltform it is working without any error..Can anyone please tell me how to go about with th

Re: [PHP] Posting a value to one form to another

2002-09-28 Thread Sascha Cunz
Oops, of course you must add one to it, too. like: Regards, Sascha > Hello, > > > On Sun, 29 Sep 2002, Sascha Cunz wrote: > > SC>I think your linux plattform has a version of PHP older than 4.2.0 and > your SC>Windows machine has a newer Version. In this "old" Versions, > Register_Globals SC>wa

Re: [PHP] Posting a value to one form to another

2002-09-28 Thread Uma Shankari T.
Hello, On Sun, 29 Sep 2002, Sascha Cunz wrote: SC>I think your linux plattform has a version of PHP older than 4.2.0 and your SC>Windows machine has a newer Version. In this "old" Versions, Register_Globals SC>was turned on. SC>Try to access $hid by using: SC> I have tried like the code

Re: [PHP] Posting a value to one form to another

2002-09-28 Thread Sascha Cunz
I think your linux plattform has a version of PHP older than 4.2.0 and your Windows machine has a newer Version. In this "old" Versions, Register_Globals was turned on. Try to access $hid by using: Regards Sascha > Hello , > > border="0"> > > While clicking this link the $hid value get incre

Re: [PHP] Include...

2002-09-28 Thread Chris Shiflett
Chuck, It is likely that either: 1. That file does not exist. 2. PHP does not have read privileges on that file. Chris Chuck PUP Payne wrote: >I am trying to start using inc files. But I am this this error > >Warning: Failed opening '/local/htdocs/movies/style.inc' for inclusion >(include

[PHP] Include...

2002-09-28 Thread Chuck PUP Payne
Hi, I am trying to start using inc files. But I am this this error Warning: Failed opening '/local/htdocs/movies/style.inc' for inclusion (include_path='.:/usr/share/php') in /local/htdocs/movies/lmenu.php on line 3 I have this in my lmenu.php Include ("/local/htdocs/movies/style.inc"); S

RE: [PHP] Posting a value to one form to another

2002-09-28 Thread Thoenen, Peter Mr. EPS
You are using method GET correct? This will not work for POST's on any platform that I know of. Browser default behavior for clicks are GET. You could create a custom browser to POST all clicks..but wouldn't work very well :) Only reason I am asking is "Posting a value" ...though Posting might

[PHP] Include...

2002-09-28 Thread Chuck \"PUP\" Payne
Hi, I am trying to start using inc files. But I am this this error Warning: Failed opening '/local/htdocs/movies/style.inc' for inclusion (include_path='.:/usr/share/php') in /local/htdocs/movies/lmenu.php on line 3 I have this in my lmenu.php Include ("/local/htdocs/movies/style.inc"); S

[PHP] Posting a value to one form to another

2002-09-28 Thread Uma Shankari T.
Hello , While clicking this link the $hid value get incremented and fetch the value from the database according to that..the same thing is working in linux platform and it is not working for the windows platform..the value is not getting increment..Can anyone please tell me how to go about

RE: [PHP] Re: php on apache on win2k

2002-09-28 Thread Vic
Thanks, I got the zip file that I needed. No it works fine, thanks. - Victor - www.argilent.com -Original Message- From: Brian McGarvie [mailto:[EMAIL PROTECTED]] Sent: Friday, September 27, 2002 3:01 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: php on apache on win2k on www.php.net y

Re: [PHP] John Holmes->Re: [PHP] Challenging problem for you programinggurus...

2002-09-28 Thread Chris Shiflett
It is because of the syntax for that command. In your case, old_column_name and new_column name would be identical. You would want to basically redefine it exactly as before (you're not changing from int to auto_increment, for example), except that you would add the auto_increment characterist

[PHP] John Holmes->Re: [PHP] Challenging problem for you programing gurus...

2002-09-28 Thread Ryan A
Hey John, Thanks for the reply, Am a bit confused, 2 guys already gave me the advise you are giving me but you also say "CHANGE COLUMN old_column_name new_column_name" why to change the column name? dont I only have to change it from being an "int" to an "Auto_Increment"? Kindly reply, Cheers, -R

Re: [PHP] Help! Can't set cookie or redirect!!!

2002-09-28 Thread Phil Powell
Never mind, I found it.. *sigh* I forgot about phpinfo().. Everything works now, cookies, redirection, everything.. thanx! Phil - Original Message - From: "John W. Holmes" <[EMAIL PROTECTED]> To: "'Phil Powell'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Saturday

RE: [PHP] Smarty template question

2002-09-28 Thread Matt Giddings
> http://www.php.net/manual/en/language.types.array.php#language.types.arr > ay.syntax > > > This is done by assigning values to the array while specifying the key > > in brackets. You can also omit the key, add an empty pair of brackets > > ("[]") to the variable-name in that case. > > > $arr[k

RE: [PHP] Smarty template question

2002-09-28 Thread Peter J. Schoenster
Was written > > > while( $row = $result->fetchRow( DB_FETCHMODE_ASSOC ) ) { > > > $rowdata[$i] = $row; > > > $i++; > > > > I don't think you need the $i. > > I need the $i because I'm assigning the every row from the result into > an array. http://www.php.net/manual/en/language.ty

RE: [PHP] Smarty template question

2002-09-28 Thread Matt Giddings
I found my problem. Nick and comment were the wrong case, they should have been NICK and COMMENT. I can't believe I did that. Thanks for the help, Matt > -Original Message- > From: Peter J. Schoenster [mailto:[EMAIL PROTECTED]] > Sent: Saturday, September 28, 2002 5:25 PM > To: [EMAI

Re: [PHP] Help! Can't set cookie or redirect!!!

2002-09-28 Thread Chris Shiflett
Phil Powell wrote: >Ok thanx.. yeah I knew that you can set a cookie before anything is set to >the browser, however, if you view my code, nothing is sent as output before >the cookie is set. > Yes, there is. Look at the following line in your code: > phpinfo(); > That comes prior to the setc

[PHP] Dear all

2002-09-28 Thread @ Saif @
Please how can I unsubscribe from this mailing list ... Thanks Regards Saif Yousif No God except Allah Mohammed is profit of Allah

Re: [PHP] Help! Can't set cookie or redirect!!!

2002-09-28 Thread Chris Shiflett
Phil, You are sending output somewhere prior to the following line: header("Location: " . $HTTP_POST_VARS["refURL"]); Basically, as soon as you output anything, PHP has to assume you are finished manipulating headers. Output can be anything from a space, newline, or HTML. It is not your setc

Re: [PHP] Session Not Saving?

2002-09-28 Thread Sascha Cunz
> function check_valid() > { > global $valid_user; > if (session_is_registered("valid_user")) > { > echo "Welcome $valid_user!"; > } > else > { > echo "You are not logged in."; > exit; > } > } try it like this: function check_valid() { global $valid_user; if (is

Re: [PHP] Help! Can't set cookie or redirect!!!

2002-09-28 Thread Phil Powell
Ok thanx.. yeah I knew that you can set a cookie before anything is set to the browser, however, if you view my code, nothing is sent as output before the cookie is set. $val) { if (strcmp($key, "isDefaultLayout") == 0) $willChangeLayout = 0; if (!empty($HTTP_POST_VARS[$key])) $isEmptyLayo

Re: [PHP] Htmlentities and Newlines?

2002-09-28 Thread Andre Dubuc
On Saturday 28 September 2002 09:13 pm, John W. Holmes wrote: > > -Original Message- > > From: Andre Dubuc [mailto:[EMAIL PROTECTED]] > > Sent: Saturday, September 28, 2002 9:14 PM > > To: [EMAIL PROTECTED]; 'Sascha Cunz'; [EMAIL PROTECTED] > > Subject: Re: [PHP] Htmlentities and Newlines?

[PHP] Session Not Saving?

2002-09-28 Thread Stephen Craton
I'm having another problem with my member's area script. When someone logs in, it's supposed to register their username into a session and it displays fine on the first page. But once you navigate to another part of the area, it does not tell you you are logged in, instead it gives me the error I

RE: [PHP] Htmlentities and Newlines?

2002-09-28 Thread John W. Holmes
> -Original Message- > From: Andre Dubuc [mailto:[EMAIL PROTECTED]] > Sent: Saturday, September 28, 2002 9:14 PM > To: [EMAIL PROTECTED]; 'Sascha Cunz'; [EMAIL PROTECTED] > Subject: Re: [PHP] Htmlentities and Newlines? > > On Saturday 28 September 2002 08:59 pm, John W. Holmes wrote: >

RE: [PHP] Help! Can't set cookie or redirect!!!

2002-09-28 Thread John W. Holmes
You can only set a cookie before any output is send to the browser. A newline, space, or , etc, is output to the browser. Redesign your code so the cookie is set before any output or use output buffering. ---John Holmes... > -Original Message- > From: Phil Powell [mailto:[EMAIL PROTECTED

Re: [PHP] Htmlentities and Newlines?

2002-09-28 Thread Andre Dubuc
On Saturday 28 September 2002 08:59 pm, John W. Holmes wrote: > > -Original Message- > > From: Andre Dubuc [mailto:[EMAIL PROTECTED]] > > Sent: Saturday, September 28, 2002 9:00 PM > > To: [EMAIL PROTECTED]; 'Sascha Cunz'; [EMAIL PROTECTED] > > Subject: Re: [PHP] Htmlentities and Newlines?

[PHP] Help! Can't set cookie or redirect!!!

2002-09-28 Thread Phil Powell
I am getting the following errors attempting to set a cookie and redirect: Warning: Cannot add header information - headers already sent by (output started at /users/ppowell/web/my/process.php:5) in /users/ppowell/web/my/process.php on line 76 Warning: Cannot add header information - headers al

RE: [PHP] Htmlentities and Newlines?

2002-09-28 Thread John W. Holmes
> -Original Message- > From: Andre Dubuc [mailto:[EMAIL PROTECTED]] > Sent: Saturday, September 28, 2002 9:00 PM > To: [EMAIL PROTECTED]; 'Sascha Cunz'; [EMAIL PROTECTED] > Subject: Re: [PHP] Htmlentities and Newlines? > > On Saturday 28 September 2002 08:42 pm, John W. Holmes wrote: >

Re: [PHP] Htmlentities and Newlines?

2002-09-28 Thread Sascha Cunz
> Does PHP do what? By default the MySQL query function can only take one > query at a time. There is nothing strange about this. The command-line > mysql tool can take multiple queries separated by semi-colons, but that is > something that is implemented in that command-line tool. It is not d

Re: [PHP] Htmlentities and Newlines?

2002-09-28 Thread Andre Dubuc
On Saturday 28 September 2002 08:42 pm, John W. Holmes wrote: > > Short question: following your advice, what would the data look like > > in > > > the > > db if I typed in: > > > > Hi Sascha. > > Next line is doubled. > > > > Double. > > > > How would that appear iun the db? In mine,

RE: [PHP] Smarty template question

2002-09-28 Thread Matt Giddings
> -Original Message- > From: Peter J. Schoenster [mailto:[EMAIL PROTECTED]] > Sent: Saturday, September 28, 2002 5:25 PM > To: [EMAIL PROTECTED] > Cc: Matt Giddings > Subject: Re: [PHP] Smarty template question > > > > On 28 Sep 2002 at 15:48, Matt Giddings wrote: > > > Hello, > > >

RE: [PHP] Htmlentities and Newlines?

2002-09-28 Thread John W. Holmes
> Short question: following your advice, what would the data look like in > the > db if I typed in: > > Hi Sascha. > Next line is doubled. > > Double. > > How would that appear iun the db? In mine, it looks exactly like I typed > it > above (using 1 & 2 with magic_quotes=on).

Re: [PHP] Htmlentities and Newlines?

2002-09-28 Thread Andre Dubuc
On Saturday 28 September 2002 08:32 pm, John W. Holmes wrote: > > -Original Message- > > From: Andre Dubuc [mailto:[EMAIL PROTECTED]] > > Sent: Saturday, September 28, 2002 8:34 PM > > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > > Subject: Re: [PHP] Htmlentities and Newlines? > > > > On Sat

Re: [PHP] Need to get last element of 2-dimensional array

2002-09-28 Thread Rasmus Lerdorf
Well, your nasty parse error is because you have 2 opening ( and 3 closing ) on that line. A quick way to get the very last element of a 2-d array is to use: echo end(end($idArray)); -Rasmus On Sat, 28 Sep 2002, Phil Powell wrote: > The following produced a rather nasty parse error: > > ech

Re: [PHP] Htmlentities and Newlines?

2002-09-28 Thread Rasmus Lerdorf
> > Yeah, good catch on the addslash/magic_quote. > > > > Also, FYI: PHP will only allow you to do one query per mysql_query(). So > > you can't try to end a quote and then send another query. Don't know if > > this is the case for all database functions, or what... > > Does PHP this? Such behavio

RE: [PHP] Htmlentities and Newlines?

2002-09-28 Thread John W. Holmes
> -Original Message- > From: Andre Dubuc [mailto:[EMAIL PROTECTED]] > Sent: Saturday, September 28, 2002 8:34 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Re: [PHP] Htmlentities and Newlines? > > On Saturday 28 September 2002 07:55 pm, John W. Holmes wrote: > > > Sorry about

[PHP] Need to get last element of 2-dimensional array

2002-09-28 Thread Phil Powell
The following produced a rather nasty parse error: echo ($idArray[0][sizeof($idArray[0])])); I have a 2-dimensional array $idArray that I must obtain the LAST element of that 2-dimensional array.. how do I do it? Thanx Phil

Re: [PHP] Htmlentities and Newlines?

2002-09-28 Thread Sascha Cunz
> Yeah, good catch on the addslash/magic_quote. > > Also, FYI: PHP will only allow you to do one query per mysql_query(). So > you can't try to end a quote and then send another query. Don't know if > this is the case for all database functions, or what... Does PHP this? Such behaviour would be p

Re: [PHP] Htmlentities and Newlines?

2002-09-28 Thread Andre Dubuc
On Saturday 28 September 2002 08:19 pm, Sascha Cunz wrote: > > Hi John, > > > > Sorry about the ambiguity. What I'm trying to accomplish is close to what > > you describe. However, before anything goes into the db (ie html chars, > > bad commands, or anything from Mr.Hacker), I verify it. Someone

Re: [PHP] Htmlentities and Newlines?

2002-09-28 Thread Sascha Cunz
> /* db access using postgresql - each row is displayed */ > ... > {$myrow['request']} > ... > ?> > > Now unless I can do something like: > > 'nl2br({$myrow['request']}' Try something like echo ''.nl2br($myrow['request'].''; Regards Sascha -- PHP General Mailing List (http://www.php.net/)

RE: [PHP] Htmlentities and Newlines?

2002-09-28 Thread John W. Holmes
Yeah, good catch on the addslash/magic_quote. Also, FYI: PHP will only allow you to do one query per mysql_query(). So you can't try to end a quote and then send another query. Don't know if this is the case for all database functions, or what... ---John Holmes... > -Original Message-

Re: [PHP] Htmlentities and Newlines?

2002-09-28 Thread Andre Dubuc
On Saturday 28 September 2002 07:55 pm, John W. Holmes wrote: > > Sorry about the ambiguity. What I'm trying to accomplish is close to > > what > > > you > > describe. However, before anything goes into the db (ie html chars, > > bad > > > commands, or anything from Mr.Hacker), I verify it. Someon

RE: [PHP] preg help ?

2002-09-28 Thread Thoenen, Peter Mr. EPS
// should work ... prob. a better way to do this but its functional :) -Peter > -Original Message- > From: :B nerdy [mailto:[EMAIL PROTECTED]] > Sent: Sunday, September 29, 2002 02:05 > To: [EMAIL PROTECTED] > Subject: [PHP] preg help ? > > > ive got a html document with the following

Re: [PHP] Htmlentities and Newlines?

2002-09-28 Thread Sascha Cunz
> Hi John, > > Sorry about the ambiguity. What I'm trying to accomplish is close to what > you describe. However, before anything goes into the db (ie html chars, bad > commands, or anything from Mr.Hacker), I verify it. Someone suggested, way > back when I first started with textarea, to use 'htm

[PHP] preg help ?

2002-09-28 Thread :B nerdy
ive got a html document with the following string in it: what i want to do is get the string which corresponds to value. so that is \oiXESASZC?~adQXZDQ?_ ive used preg_match_all ('', $contents,$out, PREG_PATTERN_ORDER); but it returns the whole document :( a little help? cheers -- PHP Gen

RE: [PHP] Htmlentities and Newlines?

2002-09-28 Thread John W. Holmes
> Sorry about the ambiguity. What I'm trying to accomplish is close to what > you > describe. However, before anything goes into the db (ie html chars, bad > commands, or anything from Mr.Hacker), I verify it. Someone suggested, way > back when I first started with textarea, to use 'htmlentities'

RE: [PHP] Member's Area Script

2002-09-28 Thread Stephen Craton
Thank you very much!!! Thanks, Stephen http://www.melchior.us http://php.melchior.us :: -Original Message- :: From: debbie_dyer [mailto:[EMAIL PROTECTED]] :: Sent: Saturday, September 28, 2002 6:03 PM :: To: [EMAIL PROTECTED] :: Subject: Re: [PHP] Member's Area Script :: :: :: :: $

Re: [PHP] Htmlentities and Newlines?

2002-09-28 Thread Andre Dubuc
Hi John, Sorry about the ambiguity. What I'm trying to accomplish is close to what you describe. However, before anything goes into the db (ie html chars, bad commands, or anything from Mr.Hacker), I verify it. Someone suggested, way back when I first started with textarea, to use 'htmlentitie

Re: [PHP] mkdir() failed: Permission denied

2002-09-28 Thread Phil Powell
Got it but the solution is derned freaky... talking to the webserver admin I come to find out that I have to write a stub executable to php4.cgi which will interpret the PHP script bypassing the Apache mods.. that way I can keep the directories at the default 0755 and STILL be able to do file mkdi

RE: [PHP] mkdir() failed: Permission denied

2002-09-28 Thread John W. Holmes
_YOU_ don't need write permissions, the web server does ---John Holmes... > -Original Message- > From: Phil Powell [mailto:[EMAIL PROTECTED]] > Sent: Saturday, September 28, 2002 4:24 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Re: [PHP] mkdir() failed: Permission denied

Re: [PHP] Member's Area Script

2002-09-28 Thread debbie_dyer
$conn = $main; <- that line is the problem - you cant use global vars inside functions without declaring them as global - Original Message - From: "Stephen Craton" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, September 28, 2002 11:49 PM Subject: [PHP] Member's Area Scrip

RE: [PHP] Newbie Q: Any difference what the .ext is on include() files???

2002-09-28 Thread John W. Holmes
The only thing to worry about is that if someone pulls up your include file, they're likely to see it as plain text and all of the code within it will be visible. If there is no PHP code within the file, or the PHP code is irrelevant (no passwords, logic, etc), then it doesn't matter. I normally

Re: Re[2]: [PHP] counting words in a string

2002-09-28 Thread olinux
wouldn't it be easier and more efficient to simply count the number of spaces in the string (and add 1)? using substr_count or something similar olinux --- Justin French <[EMAIL PROTECTED]> wrote: > You need to look at a few options... one is regular > expression (not my > forte), or perhaps w

[PHP] Member's Area Script

2002-09-28 Thread Stephen Craton
Hello again, I'm trying to write a script that has a member's area in it. So far I've been able to successfully validate only one username and only one password but now I'm going big and trying to compare it with a table in my MySQL database. Everything goes nice and smooth until I actually try a

RE: [PHP] Htmlentities and Newlines?

2002-09-28 Thread John W. Holmes
OK, I can't quite follow what you are doing. Here's what you should do. You should always save it in the database exactly how the user typed it. Save it with newlines and don't add any HTML code to it. Reason being, when this has to be edited, it'll show up in the textarea the same way the user ty

Re: [PHP] Htmlentities and Newlines?

2002-09-28 Thread Andre Dubuc
On Saturday 28 September 2002 03:30 pm, John W. Holmes wrote: > > Perhaps I don't understand the use of 'htmlentities' too well, but I > > would > > > like newlines to be retained/inserted into a db, and then if > > displayed, to > > > produce a new line from a textarea. However, I want the possib

Re: [PHP] Smarty template question

2002-09-28 Thread Peter J. Schoenster
On 28 Sep 2002 at 15:48, Matt Giddings wrote: > Hello, > > Be for warned that I am new to smarty and for some reason I'm > finding it very difficult to learn. ??? Anyway, my question is how do > I access an array of associative arrays via the {section} statement? > > Heres the code: Matt,

[PHP] Newbie Q: Any difference what the .ext is on include() files???

2002-09-28 Thread -<[ Rene Brehmer ]>-
Hi y'all I've only been working with PHP for the past 2-3 weeks, so there's alot of things I haven't quite grasped 100% yet ... Basically what I'm doing is converting my old framed, js-driven, HTML website, with 137 physical pages (individual HTML files) and some dynamically created ones, into a

Re: [PHP] Bet this is a dead horse

2002-09-28 Thread Rasmus Lerdorf
Nope, convert your SSI's to PHP. On Sat, 28 Sep 2002, John Hinton wrote: > Sorry, just signed on... due to this question... hope this horse ain't > too dead. > > Anyway, I have a need to run a SSI inside of a PHP page. Only thing I > have found so far is that maybe Apache 2.0 will handle this fe

[PHP] Bet this is a dead horse

2002-09-28 Thread John Hinton
Sorry, just signed on... due to this question... hope this horse ain't too dead. Anyway, I have a need to run a SSI inside of a PHP page. Only thing I have found so far is that maybe Apache 2.0 will handle this feature? Is there anyway to get this to work under Linux/Apache? -- John Hinton -

Re: [PHP] mkdir() failed: Permission denied

2002-09-28 Thread Sascha Braun
I've made many dirs: $path_to_dir = '../'; $images = 'images/'; $year = date('Y').'/'; $month = date('m').'/'; $source = 'jpg/'; $thumbs = 'thumbs/'; $preview = 'preview/'; $files = $HTTP_POST_FILES['image']; $path = $path_to_dir.$images.$year.$month.$source; if(!file_exists($pa

Re: [PHP] mkdir() failed: Permission denied

2002-09-28 Thread Phil Powell
Ok I did just that.. Permission is set for /users/ppowell/web/my at 0755 giving me full write permissions onto that directory, I would think, to create subdirectory /images. However, I can't do that because I get the following error: on line 27: if (!is_dir($path)) mkdir($path, 01755); // $path

RE: [PHP] mkdir() failed: Permission denied

2002-09-28 Thread John W. Holmes
Whatever user your web server is running as needs to have permission to write to that directory that you are trying to make the new one in. ---John Holmes... > -Original Message- > From: Phil Powell [mailto:[EMAIL PROTECTED]] > Sent: Saturday, September 28, 2002 3:38 PM > To: [EMAIL PROT

[PHP] smarty template question.

2002-09-28 Thread Matt Giddings
Hello, Be for warned that I am new to smarty and for some reason I'm finding it very difficult to learn. ??? Anyway, my question is how do I access an array of associative arrays via the {section} statement? Heres the code: PHP: Function readComment( &$smarty, $bid ) { ... // t

Re: Re[2]: [PHP] counting words in a string

2002-09-28 Thread debbie_dyer
You can get all the terms into an array using preg_match_all:- $str = "UNAVAILABLE More Info AVAILABLE More Info"; $regExp = "/(?:UN)?AVAILABLE|More Info/"; preg_match_all($regExp, $str, $regs); $regs[0] will contain the matched terms - you should then be able to use array functions to do whatev

[PHP] Smarty template question

2002-09-28 Thread Matt Giddings
Hello, Be for warned that I am new to smarty and for some reason I'm finding it very difficult to learn. ??? Anyway, my question is how do I access an array of associative arrays via the {section} statement? Heres the code: PHP: Function readComment( &$smarty, $bid ) { ... // t

[PHP] mkdir() failed: Permission denied

2002-09-28 Thread Phil Powell
Ok, I am stuck. I am trying to create a folder in the same directory as process.php and then use move_uploaded_file($FILES['myImage]['tmp_name']) and it constantly fails: mkdir() failed (Permission denied) Here is my code: $val) { if (strcmp($key, "isDefaultLayout") == 0) $willChangeLayout

Re: [PHP] export data to text file

2002-09-28 Thread Curtis Gordon
Why not write to a file on the server and generate a link to it? Collect info > write file > user downloads file Curtis Diana Castillo wrote: >okay, how can I write a file in csv format either to the browser or to the >server? If I use the Mysqladmin page I get all the fields, I just want some

RE: [PHP] Update identical table

2002-09-28 Thread John W. Holmes
> I have 2 identical tables called "tmp_data" and "data". (on the same mysql > database). > What would be the simple and more convenient way to update table "data" > with a row from table "tmp_data". > (something like select * from tmp_data and than update data ...). Why not have just one table w

RE: [PHP] export data to text file

2002-09-28 Thread John W. Holmes
> okay, how can I write a file in csv format either to the browser or to the > server? If I use the Mysqladmin page I get all the fields, I just want > some > of them. > Diana You can use the SELECT ... INTO OUTFILE query like someone else mentioned, and then use passthru() to send the file to th

[PHP] Imagemagick Mailinglist

2002-09-28 Thread Sascha Braun
Hi, I need some discussion about the imagemagick library. Does anyone know some about an good Imagemagick Mailinglist? Please send me some Links if you got some ;) Thanks very much Sascha

RE: [PHP] Htmlentities and Newlines?

2002-09-28 Thread John W. Holmes
> Perhaps I don't understand the use of 'htmlentities' too well, but I would > like newlines to be retained/inserted into a db, and then if displayed, to > produce a new line from a textarea. However, I want the possibility of > dangerous html excluded (hence the use of 'htmlentities'). > > Is th

RE: [PHP] Challenging problem for you programing gurus...

2002-09-28 Thread John W. Holmes
ALTER TABLE your_table CHANGE COLUMN old_column_name new_column_name NOT NULL AUTO_INCREMENT PRIMARY KEY; Then use mysql_insert_id() in your PHP code to retrieve the ID that is generated upon INSERTs. ---John Holmes... > -Original Message- > From: Ryan A [mailto:[EMAIL PROTECTED]] > Sen

[PHP] Re: Htmlentities and Newlines?

2002-09-28 Thread Christopher J. Crane
$Something = str_replace("\n", "", $Something); This is old but still works well. "Andre Dubuc" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Perhaps I don't understand the use of 'htmlentities' too well, but I would > like newlines to be retained/inserted int

Re: [PHP] unexpected T_STRING error

2002-09-28 Thread Chris Shiflett
I think you meant to end both of these strings with a ' Philip Olson wrote: > echo 'a \'string\' b"; > echo 'a "string" b"; > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] unexpected T_STRING error

2002-09-28 Thread Philip Olson
You can mix and match single (') and double (") quotes so the following are all appropriate: echo "a 'string' b"; echo "a \"string\" b"; echo 'a \'string\' b"; echo 'a "string" b"; See? PHP can't read your mind and know what " goes with what, like: echo "a"b"c"d"e"f"g"; // BAD

Re: [PHP] Htmlentities and Newlines?

2002-09-28 Thread Chris Shiflett
nl2br() covertes newlines to tags (something a browser will render). Andre Dubuc wrote: >Perhaps I don't understand the use of 'htmlentities' too well, but I would >like newlines to be retained/inserted into a db, and then if displayed, to >produce a new line from a textarea. However, I want

RE: [PHP] what do you think?

2002-09-28 Thread Tony Earnshaw
fre, 2002-09-27 kl. 14:26 skrev Ford, Mike [LSS]: > I think the page needs a drastic proof-read and grammar check -- I have trouble >understanding what some of it is even trying to say. And I haven't a clue what >"ASSAY TO INTEGRATE MANAGEMENT" is supposed to mean! > It looks like a nice prod

[PHP] Htmlentities and Newlines?

2002-09-28 Thread Andre Dubuc
Perhaps I don't understand the use of 'htmlentities' too well, but I would like newlines to be retained/inserted into a db, and then if displayed, to produce a new line from a textarea. However, I want the possibility of dangerous html excluded (hence the use of 'htmlentities'). Is there some

Re: Re[2]: [PHP] counting words in a string

2002-09-28 Thread Justin French
You need to look at a few options... one is regular expression (not my forte), or perhaps winding through the string one character at a time, writing a very simple state engine. Justin French on 28/09/02 4:47 PM, [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote: > Hello Justin, > > That worked per

Re: [PHP] export data to text file

2002-09-28 Thread Diana Castillo
okay, how can I write a file in csv format either to the browser or to the server? If I use the Mysqladmin page I get all the fields, I just want some of them. Diana -- See my web page: http://www.netrox.net/%7Ecastillo/ "Todd Pasley" <[EMAIL PROTECTED]> escribió en el mensaje [EMAIL PROTECTED]">

[PHP] Chris,Matt->Re: [PHP] Challenging problem for you programing gurus

2002-09-28 Thread Ryan A
Thanks guys, I thought it would be much more complicated than that but will look into the alter table thing. Sorry forgot to mention in the first mail, I am using MySql as its the cheapest database to get from a hosting company,otherwise on my personal machine I use MySql and/or Oracle 7.3 (pirate

Re: [PHP] Challenging problem for you programing gurus...

2002-09-28 Thread Matt
>Chris Shiflett wrote: > I didn't catch which database you are using, but you can alter a field > in MySQL to add the auto_increment characteristic. Look into the "alter > table" SQL statement. And if you do that, there won't be any trouble with the existing IDs. mysql will grab the next highe

Re: [PHP] Challenging problem for you programing gurus...

2002-09-28 Thread Chris Shiflett
I didn't catch which database you are using, but you can alter a field in MySQL to add the auto_increment characteristic. Look into the "alter table" SQL statement. Happy hacking. Chris Ryan A wrote: >how do i use the current table BUT use the more useful auto increment and >LAST_INSERT_ID(

  1   2   >