[PHP-DB] Re: permissions system

2002-06-10 Thread Jason Markantes
I've heard a couple of ideas, but so far nothing very different from what I'm planning. Has anyone done anything really different out there? Kevin, I like your idea for quickly protecting several pages. The difference here is that I need to be able to turn on any combination of access for users.

[PHP-DB] mail() function

2002-06-10 Thread Dib, Walid (MED, Stagiaire GEMS)
Hello I want to test the mail() function locally, i'm using esays php, how can I do that? thanks Walid -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] problem with mysql_query

2002-06-10 Thread Rene Schoenmakers
Hi, I've a problem with the following script. Sometimes it does write the data into the database, sometimes it doesn't. When it doesn't $result is completely blank, otherwise it is 1. $sql always returns the propper values even though $result is blank. Can anybody tell me what I'm doing wrong?

Re: [PHP-DB] problem with mysql_query

2002-06-10 Thread Markus Lervik
On Monday 10 Jun 2002 12:14 pm, Rene Schoenmakers wrote: Hi, I've a problem with the following script. Sometimes it does write the data into the database, sometimes it doesn't. When it doesn't $result is completely blank, otherwise it is 1. $sql always returns the propper values even though

RE: [PHP-DB] problem with mysql_query

2002-06-10 Thread Rene Schoenmakers
Hi, I know what's causing the problem. In $newsText sometimes single quotes are entered. There the error occurs. How can I escape these singel quotes? Regards, Rene -Original Message- From: Markus Lervik [mailto:[EMAIL PROTECTED]] Sent: maandag 10 juni 2002 12:45 To: Rene

Re: [PHP-DB] problem with mysql_query

2002-06-10 Thread Markus Lervik
On Monday 10 Jun 2002 2:15 pm, Rene Schoenmakers wrote: Hi, I know what's causing the problem. In $newsText sometimes single quotes are entered. There the error occurs. How can I escape these singel quotes? with $newsText = addslashes($newsText);

Re: [PHP-DB] problem with mysql_query

2002-06-10 Thread Markus Lervik
On Monday 10 Jun 2002 2:37 pm, Markus Lervik wrote: On Monday 10 Jun 2002 2:15 pm, Rene Schoenmakers wrote: Hi, I know what's causing the problem. In $newsText sometimes single quotes are entered. There the error occurs. How can I escape these singel quotes? with $newsText =

RE: [PHP-DB] problem with mysql_query

2002-06-10 Thread Rene Schoenmakers
It works! Thanks! -Original Message- From: Markus Lervik [mailto:[EMAIL PROTECTED]] Sent: maandag 10 juni 2002 13:37 To: Rene Schoenmakers; [EMAIL PROTECTED] Subject: Re: [PHP-DB] problem with mysql_query On Monday 10 Jun 2002 2:15 pm, Rene Schoenmakers wrote: Hi, I know what's

[PHP-DB] date format display

2002-06-10 Thread fabrizio
Hello dear all, in my mysql-db I have a date_tbl with this format: (20020531). how is possible in PHP do display date_tbl's values in a more human-readable format like 05-31-2002 or 31/05/2002 ? thaks in advance, regards fabrizio -- PHP Database Mailing List (http://www.php.net/)

Re: [PHP-DB] date format display

2002-06-10 Thread Stuart Dallas
Monday, June 10, 2002, 2:00:59 PM, you wrote: in my mysql-db I have a date_tbl with this format: (20020531). how is possible in PHP do display date_tbl's values in a more human-readable format like 05-31-2002 or 31/05/2002 ? Look at date and strtotime... http://www.php.net/date

Re: [PHP-DB] date format display

2002-06-10 Thread Manuel
This function will fix your date display. $sqldate=20020531; $sqldate= fixdate($sqldate); function fixdate($data){ $aux=; $z=0; for($i=0; $istrlen($data); $i++) { if($i=3) { $aux[0].=$data[$i]; } if($i==4 or $i==5) { $aux[1].=$data[$i]; } if($i==6 or $i==7) {

Re: [PHP-DB] mail() function

2002-06-10 Thread Edward Marczak
On 6/10/02 5:02 AM, Dib, Walid (MED, Stagiaire GEMS) [EMAIL PROTECTED] pressed the keys forming the message: Hello I want to test the mail() function locally, i'm using esays php, how can I do that? Not sure what esays php is, but you don't say what platform you're on. Basically, you need

RE: [PHP-DB] date format display

2002-06-10 Thread Gary Pullis
This is how I'd do it: $strtime = 20020531; // Example date string // STEP 1: Turn the MMDD string into a UNIX date $unixtime = mktime(substr($strtime, 8, 2),substr($strtime, 10, 2),0,substr($strtime, 4, 2),substr($strtime, 6, 2),substr($strtime, 0, 4)); // STEP 2: Use the date() function

[PHP-DB] CSV/TXT file imported via PHP into MySQL

2002-06-10 Thread Keiran Wynyard
I have a form on a PHP page with which I wish to load a tab delimited text file into a UNIX based MySQL database By using PHPMyAdmin I have tested whether I can upload the file, using MyAdmin to help me construct the Query and to date in MyAdmin it works fine. Taking the query and splitting it

[PHP-DB] How do I get a ' in my sql statement?

2002-06-10 Thread Blaine Dinsmore
I have noticed that when I try to assign the value of a input field that has a ' in it for example : can't It will goof up my attempt to load the information to the database. Anyone know a way around this? Do I have to send each string through a parsing routine before assigning my string to

Re: [PHP-DB] How do I get a ' in my sql statement?

2002-06-10 Thread Daniel Brunner
Hello!! Spit some code out...I put a lot of ' in my inserts... Is it from a form?!?!!? Is it from a Insert, or Select or Update?!? That's why we need some code... Dan On Monday, June 10, 2002, at 12:01 PM, [EMAIL PROTECTED] wrote: I have noticed that when I try to assign the value of a

Re: [PHP-DB] How do I get a ' in my sql statement?

2002-06-10 Thread Terry Romine
Any text field that has the possibility of getting quotes should be handled by $textfield = addslashes($textfield); prior to insert. Then on displaying, use $textfield = stripslashes($textfield); If it is a big text (including paragraphs) I use $textfield =

Re: [PHP-DB] How do I get a ' in my sql statement?

2002-06-10 Thread Blaine Dinsmore
Terry, Thanks for the tip on the nl2br function. That function proved to be very helpful when displaying data in a HTML table. I noticed the \n is ok when sending text to a form with multiline input boxes. Thanks, Blaine Terry Romine [EMAIL PROTECTED] 06/10/02 02:35PM Any text field that

RE: [PHP-DB] CSV/TXT file imported via PHP into MySQL

2002-06-10 Thread Beau Lebens
Keiran, in your second page, you refer to $textfile as the thing that you want to load into the database; this file doesn't exist on the server, so it is inserting nothing I would imagine. You need to use something like $_FILES['tmp_name'] to refer to the actual file, once it has been

[PHP-DB] Having trouble understanding how to manage arrays

2002-06-10 Thread Bill Fleury
Hi all. I am very new to this, and have been reading my way through php, but have come accross a stumbling block that I just don't seem able to get past, although I'm sure it's something simple. I have a very basic mysql database set up, that contains a table with 4 fields- type, manname,

[PHP-DB] problem with a small script

2002-06-10 Thread suman
hi i can't understand whats missing here.thou i knew this ques is asked many times i couldn't find an ans for it. - form method=get action=stuinfo.php firstname: input type=text name=fname size=15

[PHP-DB] Re: Having trouble understanding how to manage arrays

2002-06-10 Thread Adam Royle
Hi Bill, Looks like you're making it hard for yourself, by querying the database for each record found. Here is some code which should make your life easier. Of course, I have developed functions which would turn the following code into 10 or so lines, but this should work for your situation.

Re: [PHP-DB] Having trouble understanding how to manage arrays

2002-06-10 Thread Jason Wong
On Tuesday 11 June 2002 13:20, Bill Fleury wrote: Hi all. I am very new to this, and have been reading my way through php, but have come accross a stumbling block that I just don't seem able to get past, although I'm sure it's something simple. I have a very basic mysql database set up,

Re: [PHP-DB] problem with a small script

2002-06-10 Thread George Pitcher
Suman, Firstly, it's a bit longer than necessary. Make your form a 'POST' rather than 'GET' and you'll hide your query and ?php echo $fname; ? will then be the equivalent. I presume that you have been able to display other PHP stuff? Check your php.ini file and make sure that the part that