RE: [PHP] Newbie Question re substr

2005-03-08 Thread Kim Madsen
From: Jackson Linux [mailto:[EMAIL PROTECTED] Sent: 8. marts 2005 04:23 First of all, echo the output to see if You get, what Tou expect in a debug situation: if (!empty($where)) { echo "  "; $article = mysql_fetch_assoc($result); } else { while ($article = mysql_fetch_assoc($result)) {

[PHP] php-help

2005-03-08 Thread K Karthik
sir, iam new to php i'll explain my problem .if u could help i'll be very thankful... in my mysql database i have two tables i.e., table1 and table2. i have an array of result from one query "select feild1 from table1 " i have to use this result in another query. "select field2 from table

Re: [PHP] Document root, preferred way to find it???

2005-03-08 Thread Jochem Maas
Leif Gregory wrote: Hello Marek, Sunday, March 6, 2005, 7:08:24 PM, you wrote: I don't see where that tells me where the include folder would be. MK> If you know how the files are layed out in your application, you do. No... You missed the point of this whole thread which was explained in point 1 a

[PHP] recommended way for server side validation - include in same file or have a different file

2005-03-08 Thread Vinayakam Murugan
Hi I have always felt for reasons for cleanliness and clarity, it is better to have the validation and insert / update statements in a seperate file rather than have it in the same script. Case 1 -- //file:form.php if $_POST then validate Insert or update on success else if $_GET['p

Re: [PHP] ftp upload via web form - problem getting the file name correct

2005-03-08 Thread Franklin van de Meent
Hello Steve, I tried this on my own servers and after replacing "" with $ftp_server it works perfectly, all ASCII files get uploaded the way they should with the correct filenames. Do you get any errors? (add error_reporting(E_ALL); above the login vars to show them all) -- PHP General Mailing

Re: [PHP] php-help

2005-03-08 Thread Frank Arensmeier
Hi, MySQL is capable of doing very complex queries. You could boil down your query into just one single line: 'SELECT * FROM table1, table2 WHERE table2.field2 = table1.field1' A good starting point would be the MySQL manual. I would also strongly recommend you to take a look at the PHP manual f

Re: [PHP] Using switch() to process a set of forms

2005-03-08 Thread Franklin van de Meent
On Mon, 07 Mar 2005 19:19:24 -0600, Greg Dotts <[EMAIL PROTECTED]> wrote: > Sure enough Kirk! That was it. Seems strange that you can set a > name/value pair on the tag, but they aren't used. Guess they > were just kidding ;-) The name attribute is used in javascript, for example when you are

Fwd: [PHP] Newbie Question re substr

2005-03-08 Thread Jackson Linux
Thanks, Kim! Still having difficulties though.. On 8 Mar 2005, at 03:29, Kim Madsen wrote: From: Jackson Linux [mailto:[EMAIL PROTECTED] Sent: 8. marts 2005 04:23 First of all, echo the output to see if You get, what Tou expect in a debug situation: if (!empty($where)) { echo "  "; $articl

Re: [PHP] fsockopen and session_start

2005-03-08 Thread Pedro Garre
*This message was transferred with a trial version of CommuniGate(tm) Pro* It works now. Thanks Jason. I had never realized that once $_SESSION is set, and if you are not going to modify it, the session could be closed. It does not seem a good programming practice, thou. On Tuesday 08 March 20

Re: [PHP] php-help

2005-03-08 Thread John Nichel
K Karthik wrote: sir, iam new to php i'll explain my problem .if u could help i'll be very thankful... in my mysql database i have two tables i.e., table1 and table2. i have an array of result from one query "select feild1 from table1 " i have to use this result in another query. "select f

Re: [PHP] recommended way for server side validation - include in same file or have a different file

2005-03-08 Thread Leif Gregory
Hello Vinayakam, Tuesday, March 8, 2005, 4:11:43 AM, you wrote: V> However in the second case, in case of an error, displaying the V> data becomes an issue. V> Any recommended ways for server side validation I usually do the updates in the same file unless there are a lot of different things go

Re: [PHP] Document root, preferred way to find it???

2005-03-08 Thread Leif Gregory
Hello Jochem, Tuesday, March 8, 2005, 3:30:19 AM, you wrote: J> J> I'm pretty sure the url is ./includes/site.css i.e. the include J> subdir of the dir in which the html file that includes the link tag J> is in. if you move the html file up or down a dir then the link to J> the css file will bre

Re: [PHP] recommended way for server side validation - include in same file or have a different file

2005-03-08 Thread Brent Baisley
The way I do it is to have display, edit, validation and save all in the same "file". I have an "op" variable that tracks whether the operation is an edit or reedit (reuse submitted data) because of validation failure. Another variable would track if it's a new entry (blank fields) or editing a

[PHP] Quite a basic question

2005-03-08 Thread Mário Gamito
Hi, This is quite a very basic question, but i think the code following my signature should work. Instead, i get a "Warning: Cannot modify header information - headers already sent by (output started at /home/vhosts/dte/cv/register_action.php:10) in /home/vhosts/dte/cv/register_action.php on lin

[PHP] Re: Quite a basic question

2005-03-08 Thread Kae Verens
MÃrio Gamito wrote: > Hi, > > This is quite a very basic question, but i think the code following my > signature should work. > Instead, i get a > "Warning: Cannot modify header information - headers already sent by > (output started at /home/vhosts/dte/cv/register_action.php:10) in > /home/vhost

Re: [PHP] Quite a basic question

2005-03-08 Thread Leif Gregory
Hello Mário, Tuesday, March 8, 2005, 8:18:34 AM, you wrote: M> How can i solve this ? M> Any help would be apreciated. Because you're outputting javascript to the browser before doing the redirection. You can't output *anything* to the browser before a redirect. M> echo" M> M>

RE: [PHP] Quite a basic question[Scanned]

2005-03-08 Thread Michael Egan
Mario, >From the PHP Manual: "Remember that header() must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP. It is a very common error to read code with include(), or require(), functions, or another file access function, and have spaces

Re: [PHP] Quite a basic question

2005-03-08 Thread Jochem Maas
Mário Gamito wrote: Hi, This is quite a very basic question, but i think the code following my signature should work. Instead, i get a "Warning: Cannot modify header information - headers already sent by (output started at /home/vhosts/dte/cv/register_action.php:10) in /home/vhosts/dte/cv/regist

[PHP] usage of php &

2005-03-08 Thread Jochem Maas
I sure I'm not the only one on this list that reads php-internals after reading the thread entitled: "" I'm wondering if anyone here has _ever_ used the tags to enclose php code? e.g.: