Re: [PHP] posting news via php - 535 error

2002-08-09 Thread Latex Master

Hello andy,
Try to put a . when you finished at the new line. And use utf7
encoding.

Friday, August 9, 2002, 10:11:44 AM, you wrote:

a Hi there,

a I am trying to write a script which is posting news to a newsserver.
a Unfortunatelly I do get a 535 error back which is not reported in:
a http://www.faqs.org/rfcs/rfc977.html Section 3.10.2

a Maybe someone of you guys has a clue of an idea what is going wrong.
a connecting works, so I did not include the connect code. The code for
a posting is underneath.

a Thanx for any help on that.

a Andy


a $cfgServer= news.php.net;
a $cfgNewsGroup= php.general;
a $subject='Test';
a $header='
a  Newsgroups: '.$cfgNewsGroup.'
a  Path: '.$cfgServer.'
a  Relay-Version: version B 2.10 2/13/83; site cbosgd.UUCP
a  Posting-Version: version B 2.10 2/13/83; site eagle.UUCP
a  From: [EMAIL PROTECTED] (Jerry Schwarz)
a  Subject: '.$subject.'
a  Message-ID: [EMAIL PROTECTED]
a  Date: Friday, 10-Aug-2002 16:14:55 EST
a  Followup-To: '.$cfgNewsGroup.'
a  Expires: Saturday, 1-Jan-2003 00:00:00 EST
a  Date-Received: Friday, 10-Aug-2002 16:59:30 EST
a  Organization: Bell Labs, Murray Hill
a ';

a $body='\n
a This is a test.
a ';

a $message=$header.$body;

a $put = fputs($usenet_handle, POST $message\n);

a echo $put;






-- 
Best regards,
 Latexmailto:[EMAIL PROTECTED]


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




Re: [PHP] imap connection problem

2002-07-17 Thread Latex Master

Hello Korbinian,
  Can you provide the script code?
Let's see how we can help

Wednesday, July 17, 2002, 4:50:44 PM, you wrote:

KS when i try to connect to my local imap server by php i get the message
KS (standard ie message) that the page can't be shown. with another server
KS (imap.web.de) everything works fine. with outlook i can access my server
KS without any problems and also mtest seems to work without any errors. what's
KS wrong. would be nice if anybody could help me.

KS CU Korbi






-- 
Best regards,
 Latexmailto:[EMAIL PROTECTED]


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




Re[2]: [PHP] integrating usenet into http? how is this done???

2002-07-16 Thread Latex Master

Hello andy,

  Well i do work on the same project. Now i got little lost with
  headers. If anyone can help me I'll be glad. as for all othe
  issues like updating databases they are solved :) With now cron
  job :)
  
Monday, July 15, 2002, 7:27:19 PM, you wrote:

 It would be relatively straight-forward to have a PHP script run
a periodically,
 read from an NNTP server ..

a ok sounds logical. Don't have any experiance on doing anything nntp related
a in php.

a There are some questions I am wondering about:

a - do I have to compile php with a special flag to do this?
a - how is it possible to run a php script periodicly?
a - can you mak a short example how to read from a nntp server?

a Thanx for your help,

a Andy



a Stuart Dallas [EMAIL PROTECTED] schrieb im Newsbeitrag
a [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 On Monday, July 15, 2002, 2:42:24 PM, Stuart Dallas wrote:
  On Monday, July 15, 2002, 1:55:44 PM, Andy wrote:
  Has anybody an idea how they do this.

 It would be relatively straight-forward to have a PHP script run
a periodically,
 read from an NNTP server and add new posts into the forum database. This
a is how
 I would guess that they do it.

 --
 Stuart







-- 
Best regards,
 Latexmailto:[EMAIL PROTECTED]


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




[PHP] Little php execution question.

2002-07-08 Thread Latex Master

Hello php-general,

  I finally finish my work on one of the projects. I got a question
  how PHP executes a script.
  Let's say i got a little script but it takes him a long time to work
  (don't blame me please) If a user stops loading page of will close
  the window. Will Script continue working till the end or php will
  kill that process?

-- 
Best regards,
 Latex  mailto:[EMAIL PROTECTED]


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




Re[2]: [PHP] is their a jobs mailing list?

2002-07-08 Thread Latex Master

Hello PHP,

  As for me I can provide a server platform for it :) and even a
  domain name. Like phpjobs.com.ru if it will be suitable for all.
Those domains are free for Russian programmers :)


 CUT 



-- 
Best regards,
 Latexmailto:[EMAIL PROTECTED]


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




Re: [PHP] Maybe not the right place, but...

2002-07-05 Thread Latex Master

Hello Alberto,
   255 charasters
Friday, July 5, 2002, 5:43:40 PM, you wrote:

AS ðÒÉ×ÅÔ!

AS Does anybody know which is the lenght limit for the parameter string 
AS when GETting an URL? If there is a limit at all, of course.

AS áÌØÂÅÒÔÏ
AS ëÉÅ×


AS -- 


AS @-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

AS LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
AS lOrD i'M sHiNiNg...
AS YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
AS tHe TeSt, YeS iT iS
AS ThE tEsT, yEs It Is
AS tHe TeSt, YeS iT iS
AS ThE tEsT, yEs It Is...





-- 
Best regards,
 Latexmailto:[EMAIL PROTECTED]


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




[PHP] Little optimisation question

2002-07-05 Thread Latex Master

Hello php-general,

  I've recently faced big optimization issues. Here is mine
situation:

I make connection to NNTP server and fetch headers from the news group
lets say bla.bla.bla. Connection made ok. Next Php tryes to put
everything into the array. It's okey if number of headers are lower
then let's say 100. But if number of headers get greater then 100,
it's a pain in the ass. I have to wait for 90-100 seconds till the
operation completes. (I'm talking here about large value news groups).
So I have faced that I need to optimize it somehow.
At this point of time i've got only idea is to put all the headers in
the database. But not sure how to update database frequently. Any
ideas even fantastic ones are welcome.

-- 
Best regards,
 Latex  mailto:[EMAIL PROTECTED]


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




Re: [PHP] PHP Automatic Backup

2002-07-05 Thread Latex Master

Hello César, PHP,
As for your question the answer is yes. At this point of time I'm
working on it also. The main idea is set of a few scripts. One for
dumping Database with data to a file, second one is creating a tar
archive, and third one using fopen to put on FTP server some
where:) It works. but I'm to lazy to complete it. :)

Friday, July 5, 2002, 12:51:17 PM, you wrote:

CA Hi all.
 
CA I was reading the post by Pag called “MySQL backups” and I have the same
CA question, but not the shell access. It came to my mind, that if will be
CA very useful for me, and probably for many of us newbie’s, to be able to
CA build an automated PHP system that could make backups by itself at a
CA specified time… let’s say maybe every morning at 6 am, by transferring
CA or uploading the MySQL files to another server. I noticed that this
CA could be done in PHPNuke, by clicking at “Backup Files”. ¿Is it possible
CA to build this kind of unattended scripts with PHP or will it always
CA require a magical “click” from the administrator?
 
CA I guess that it shouldn’t be possible, but it’s worth a shot.
 
CA Thanks in advance,
 
CA Cesar Aracena mailto:[EMAIL PROTECTED] 
CA CE / MCSE+I
CA Neuquen, Argentina
CA +54.299.6356688
CA +54.299.4466621
 



-- 
Best regards,
 Latexmailto:[EMAIL PROTECTED]


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




Re: [PHP] Re: Program executing in PHP. Please help (SOLVED)

2002-07-04 Thread Latex Master

Hello Richard, PHP,
  Well I did a typo here. Sorry about it. At that moment i was
really nuts, and needed a rest. Now I solved that problem, but only
after UPDATING PHP from 4.0.6 to 4.2.1 And shell_exec worked. Exec
didn't :( I'm going to investigate this question in the future.

Thank's for the help.  And as usual if anyone will need it. Here is a
working script:

?
echo Test 2br;
$output = shell_exec('uudeview -i /bla/bla.txt -p /bla/bla/');
echo pre;
echo ($kick_my_ass);
echo /pre;
?

Thursday, July 4, 2002, 12:48:13 AM, you wrote:

?
$output = shell_exec(uudeview -i /bla/bla.txt -p /bla/bla/);
echo pre;
echo $kick_my_ass;
echo /pre;
?
 And I get nothing :(. Script like below:

RL Well, no...

RL Your data is in $output, and you are echo-ing out $kick_my_ass...  Try echo
RL $output

?
$output = shell_exec(uudeview);
echo pre;
echo $kick_my_ass;
echo /pre;
?
  Work fine outputting me command line parameters.

  What have I done wrong?

RL It's also possible that you just made a typo here, but the real code has the
RL right variables...

RL In that case, try this:

RL $command = uudeview -i /bal/bal.txt -p /bla/la;
RL exec($command, $results, $errorcode);
RL echo implode(BR\n, $results);
RL if ($errorcode){
RL   echo OS Error: $errorcode.  Use 'man errno' to look it up, but it's
RL probably path/permissions.BR\n);
RL }

RL -- 
RL Like Music?  http://l-i-e.com/artists.htm





-- 
Best regards,
 Latexmailto:[EMAIL PROTECTED]


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




[PHP] Function imap_headers question.

2002-07-04 Thread Latex Master

Hello php-general,

  I've got a little question about imap_headers. I working on a
  project which must connect to local nntp server. I have no problems
  doing it, but as far as I know from documentation Imap_headers()
  fetches msg headers in to the arrey. So let's say I've got 5000 post
  in the box. When i try to open it it fetches all the headers. and
  then brings me them on the web page. I want to display sets of 50
  headers per page. that makes 100 pages. and every page will connect
  to server fetch ALL headers and etc. Any possibility to limit
  headers fetch like mysql limit 0, 50 and so on?
  Also any ideas how to speed it up also are welcome

-- 
Best regards,
 Latex  mailto:[EMAIL PROTECTED]


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




Re: [PHP] AdRotator for PHP?

2002-07-04 Thread Latex Master

Hello Patrick,
  Try to look at hotscripts.com there are lots of scripts there.
  Personally i prefer to write ones by myself.
Thursday, July 4, 2002, 3:31:20 PM, you wrote:

PT Hey,

PT I'm wondering if anyone has found or ended up writing something similar to
PT the MSWC AdRotator object in ASP, but for PHP?  Or is there already a module
PT on apache.org that I missed?

PT Thanks for any help :)

PT Patrick






-- 
Best regards,
 Latexmailto:[EMAIL PROTECTED]


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




Re: [PHP] Moving a file with 'rename'?

2002-07-04 Thread Latex Master

Hello Tim,
Tim why don't you try shell_exec ?

Thursday, July 4, 2002, 5:03:34 PM, you wrote:

TS Hi people,

TS I want to move a file from one location to another. I expect I can only do 
TS this with 'rename', because there's no 'move'-command (at least nog in the 
TS manual). Following situation:

TS original file: /var/www/html/webfotos/tmp/thumb_phpibmGBF.jpg
TS with /var/www/html/webfotos being a symlink to /home/cvd/sanbox/webfotos
TS new location: /var/www/html/foto/0/0/0/0/.thumb.jpg

TS syntax: rename($old_location, $new_location);

TS Error: Warning: Rename failed (Invalid cross-device link) in 
TS /home/cvd/sandbox/webfotos/admin/save.php on line 95

TS When I 'su' to 'apache' (the user under which the httpd is running), I can 
TS do the following without any error:

TS mv /var/www/html/webfotos/tmp/thumb_phpibmGBF.jpg 
TS /var/www/html/foto/0/0/0/0/.thumb.jpg

TS Any ideas on why I get the error and how I can solve it? Tia!

TS -- 
TS Kind regards,
TS Tim




-- 
Best regards,
 Latexmailto:[EMAIL PROTECTED]


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




Re: [PHP] Microsoft Access PHP

2002-07-04 Thread Latex Master

Hello Daniel,
Try to use a query line like below:
WHERE (((ExamPapers.School)=\Colour and Imaging Institute\) AND ((ExamPapers.[Add to 
Webpage])=True));
And let us know it it will work


Thursday, July 4, 2002, 5:21:50 PM, you wrote:

DJOM Hi,

DJOM I'm gleaning microsoft SQL from queries within a MS Access database, for 
insertion into my PHP pages. This has been working fine but the example below just 
refuses to work,

DJOM SELECT ExamPapers.EPaperID, ExamPapers.EPapersText, ExamPapers.[Title of Paper], 
ExamPapers.Course, ExamPapers.School, ExamPapers.Year, ExamPapers.[Jan/Summer], 
ExamPapers.[Module Code],
DJOM ExamPapers.Stage, ExamPapers.[Storage Location], ExamPapers.[Add to Webpage]
DJOM FROM ExamPapers
DJOM WHERE (((ExamPapers.School)=Colour and Imaging Institute) AND 
((ExamPapers.[Add to Webpage])=True));

DJOM I want to pull records from 1 table (ExamPapers). 
DJOM The WHERE line is causing problems i.e if I remove it, my php pages actually 
show. Can anyone see what I'm doing wrong?

DJOM Thanks,

DJOM Daniel Owen-McGee





-- 
Best regards,
 Latexmailto:[EMAIL PROTECTED]


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




[PHP] Program executing in PHP. Please help

2002-07-03 Thread Latex Master

Hello php-general,

  Dear php list,

  I've got completely lost in program execution under php.
I need to run a command grab it's output for the next processing,
So I wrote a script:

?
$output = shell_exec(uudeview -i /bla/bla.txt -p /bla/bla/);
echo pre;
echo $kick_my_ass;
echo /pre;
?
 And I get nothing :(. Script like below:
?
$output = shell_exec(uudeview);
echo pre;
echo $kick_my_ass;
echo /pre;
?
  Work fine outputting me command line parameters.

  What have I done wrong?
  
-- 
Best regards,
 Latex  mailto:[EMAIL PROTECTED]

 BTW: PHP not running SAFE MODE


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




Re[2]: [PHP] cURL in an exec() . more

2002-07-03 Thread Latex Master

Hello jay,
  Jay try just to execute php yourfilename

  And see what is done. For example i have problems with execution
  read my e-mail in the list.


Wednesday, July 3, 2002, 4:56:39 PM, you wrote:

jbnc [snip]
jbnc As a matter of fact, when viewing the source (which should display properly
jbnc if word wrap is off in Notepad) the line appears to be broken up. I have an
jbnc idea...write the line to a file then open the file and get the line for
jbnc exec()...blabbering now, must go...
jbnc [/snip]

jbnc I have fixed many things and had many great suggestions pointed my way, I
jbnc appreciate all of it! So to state the problem in the light of this new day
jbnc here is what I have;

From the command line this works perfectly;
jbnc curl -d name=mynamepassword=mypasswordbtnsubmit=submit -s -o
jbnc cdrlist.html https://theserver.com/download/list.html

jbnc Using exec() (or shell_exec(), or others in the family) like this;

jbnc exec(curl -d \name=mynamepassword=mypasswordbtnsubmit=submit\ -s -o
jbnc cdrlist.html https://theserver.com/download/list.html;);

jbnc does not work. I have made sure that the output of the exec() is all on one
jbnc line through many tests. I have placed the command line arguements in
jbnc variables and re-done the exec() call as many ways as I can think of. Is
jbnc anyone aware of any problems with exec() that may be causing this behavior?
jbnc Any insight would be grandly appreciated.

jbnc Thanks!

jbnc Jay






-- 
Best regards,
 Latexmailto:[EMAIL PROTECTED]


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




Re[4]: [PHP] cURL in an exec() . more

2002-07-03 Thread Latex Master

Hello Jay,
  Let's try it in the different way. create an executable command
file. and try to execute it via php it must work.

Wednesday, July 3, 2002, 5:20:49 PM, you wrote:

JB [snip]
JB   Jay try just to execute php yourfilename

JB   And see what is done. For example i have problems with execution
JB   read my e-mail in the list.
JB [/snip]

JB Still not working. I have the script check for the existence of the file and
JB return an error if it is not downloaded. That is the only error I get

JB Thanks!




-- 
Best regards,
 Latexmailto:[EMAIL PROTECTED]


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




Re[6]: [PHP] cURL in an exec() . more

2002-07-03 Thread Latex Master

Hello Jay,
  Let us know if it worked
Wednesday, July 3, 2002, 5:27:21 PM, you wrote:

JB Trying that now...

JB -Original Message-
JB From: Latex Master [mailto:[EMAIL PROTECTED]]
JB Sent: Wednesday, July 03, 2002 8:26 AM
JB To: Jay Blanchard
JB Cc: [EMAIL PROTECTED]
JB Subject: Re[4]: [PHP] cURL in an exec() . more


JB Hello Jay,
JB   Let's try it in the different way. create an executable command
JB file. and try to execute it via php it must work.

JB Wednesday, July 3, 2002, 5:20:49 PM, you wrote:

JB [snip]
JB   Jay try just to execute php yourfilename

JB   And see what is done. For example i have problems with execution
JB   read my e-mail in the list.
JB [/snip]

JB Still not working. I have the script check for the existence of the file
JB and
JB return an error if it is not downloaded. That is the only error I get

JB Thanks!




JB --
JB Best regards,
JB  Latexmailto:[EMAIL PROTECTED]






-- 
Best regards,
 Latexmailto:[EMAIL PROTECTED]


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




[PHP] php execution a server side program updated problem please help

2002-07-03 Thread Latex Master

Hello php-general,

Hello php-general,

  Dear php list,

  I've got completely lost in program execution under php.
I need to run a command grab it's output for the next processing,
So I wrote a script:

?
$output = shell_exec(uudeview -i /bla/bla.txt -p /bla/bla/);
echo pre;
echo $output;
echo /pre;
?
 And I get nothing :(. Script like below:
?
$output = shell_exec(uudeview);
echo pre;
echo $output;
echo /pre;
?
  Work fine outputting me command line parameters. Also when i run
  this file via linux console i get the following mess:
***
php 6.php
X-Powered-By: PHP/4.0.6
Content-type: text/html

Loaded from /bla/bla.txt: '' (cs99g021.idx): cs99g021.idx part 1 be
gin end yEnc
htmlbodypre
Found 'cs99g021.idx' State 16 yEnc Parts begin 1 end OK

File successfully written to /bla/bla/cs99g021.idx
1 file decoded from 1 input file, 0 failed
/pre/html/body

I think it must be in the other way, like this:
htmlbodypre
Loaded from /bla/bla.txt: '' (cs99g021.idx): cs99g021.idx part 1 be
gin end yEnc Found 'cs99g021.idx' State 16 yEnc Parts begin 1 end OK

File successfully written to /bla/bla/cs99g021.idx
1 file decoded from 1 input file, 0 failed
/pre/html/body


Please give me some clues where is my mistake, i'm getting little
nuts.


-- 
Best regards,
 Latex  mailto:[EMAIL PROTECTED]


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




Re[2]: [PHP] addslahes and magic quote woes

2002-07-03 Thread Latex Master

Hello Jean-Christian,
  The answer is NO NO NO. At the beginning you have talked about
  security. You have to realize that there is no 100% protection
  against hackers. Using strip/addslashes will help you to filter
  some user input not all. :) So try to pick one way and go that
  way. if magic quotes are turned on you want need addslashes if
  they are off you will need them.
  

Wednesday, July 3, 2002, 6:21:37 PM, you wrote:

JCI Erik Price wrote:



 Turn off magic_quotes and do addslashes() explicitly every time you do a 
 database insert.  Then make sure you always stripslash() data returned 
 from a database query.
 
 magic_quotes is convenient for newbies, but after a while you'll find it 
 only trips you up, as you've discovered.


JCI I totally agree.

JCI Security question: Is turning off magic_quotes and using 
JCI strip/addslashes() a 100% effective solution against malicious user input?

JCI Jc





-- 
Best regards,
 Latexmailto:[EMAIL PROTECTED]


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




Re[2]: [PHP] cURL in an exec() . more

2002-07-03 Thread Latex Master

Hello Jay,
That wasn't what i recommended you LOL :).
Ok from the beginning PHP executes and writes files with
permissions (like userid and groupid) Webserver is running.
So what i think will be the best way for you to do. Is to create an
executable with the same owner. and then execute it. As for
/usr/local/bin directory it allows to write in it only to root or
superuser. I recommend you to create  a user like foo
then in his home directory create a subdirectory like web and chmod it
to 777. and use it as an output for the script. Got an idea?
Also you always can use /tmp directory :)

Wednesday, July 3, 2002, 6:49:08 PM, you wrote:

JB OK, here is where I am (between handling other pre-holiday/long weekend
JB processese here);

JB I have the PHP script create a shell script containing the needed code for
JB the cURL process. Of course the shell script will execute from the command
JB line with me as 'root'. But the exec() that calls the shell script will not
JB execute the script because of improper permissions. (Has to do with the
JB permissions on the topmost directory for where the file lives, changing that
JB could be dangerous from a security standpoint).

JB So I have tried to change those (I am on a Linux box) via the PHP, no luck.
JB It will let me chmod the shell script via the PHP script. So I tried to move
JB the script to /usr/local/bin;

JB rename(getlist.sh, /usr/local/bin/getlist.sh); Permission denied
JB exec(mv getlist.sh /usr/local/bin/getlist.sh); Permissiion denied
JB exec(cp getlist.sh /usr/local/bin/getlist.sh); Permissiion denied

JB I am looking into posix_setuid() to change the permissions for the time
JB needed, but I've a feeling, after a couple of tests, that this is not going
JB to be the way to do this either.

JB I wish permissions in Linux were more straigtforward. Anyone have an idea
JB how to do this with opening the server wide? Thanks for all your help.

JB Jay






-- 
Best regards,
 Latexmailto:[EMAIL PROTECTED]


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




[PHP] NNTP tutorial

2002-07-02 Thread Latex Master

Hello php-general,

  Dear PHP programmers, anyone can point me to a nice tutorial working
  with NNTP (Usenet) servers?
  

-- 
Best regards,
 Latex  mailto:[EMAIL PROTECTED]


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




[PHP] How can I output a query in a table with the output in multiple columns?

2002-06-21 Thread Latex Master

Dear List,

  I've got the following situation: I have a list of items i want placed in 
side-by-side columns in a table like this:

name name name name
name name name name
name name name name
name name name name

and so on. How can I do it? Name is a string in the database.

-- 
Best regards,
 Latexmailto:[EMAIL PROTECTED]


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




[PHP] (SOLVED) [PHP] How can I output a query in a table with the output in multiple columns?

2002-06-21 Thread Latex Master

Hello John, PHP
I used your script almost everything is worked. Thanks. Here is the
script if someone will need it :)

?
$count = 1;
$Num_Across = 4;
$Width = floor(100 / $Num_Across);
while($row = MySQL_fetch_array($result))
{
  //create first cell
  $ = $count / $Num_Across;
  echo td width='.$Width.'.$row['name']./td\n;

  //keep a count so you know when to start a new row
  if(round($) == $)
  { echo /trtr\n; }
  $count++;
};

//this will finish the table, i.e. if you only have one
//name on last row, this will fill in the remaining table
//cells
$left = $Num_Across - (--$count  % $Num_Across);
for($x=0;$x$left;$x++)
{ 
echo tdnbsp;/td\n; 
};
echo /tr;
echo /table;
?

Friday, June 21, 2002, 3:42:24 PM, you wrote:

   I've got the following situation: I have a list of items i want
JH placed
 in side-by-side columns in a table like this:
 
 name name name name
 name name name name
 name name name name
 name name name name
 
 and so on. How can I do it? Name is a string in the database.

JH You can try something like this:

JH ?
JH $Count = 1;
JH $Num_Across = 4;
JH $Width = floor(100 / $Num_Across);

JH //start table and first row
JH echo table width='100%'\n;
JH echo tr\n;

JH while($row = MySQL_fetch_array($result))
JH {
JH   //create first cell
JH   echo td width='$width'.$row['name']./td\n;

JH   //keep a count so you know when to start a new row
JH   if($count % $Num_Across == 0)
JH   { $retval .= /trtr\n; }
JH   $count++;
JH }

JH //this will finish the table, i.e. if you only have one
JH //name on last row, this will fill in the remaining table
JH //cells
JH $left = $Num_Across - (--$count  % $Num_Across);
JH for($x=0;$x$left;$x++)
JH { echo tdnbsp;/td\n; }

JH That last part isn't tested. I used a different method, but hopefully
JH this gives you an idea.

JH ---John Holmes...



-- 
Best regards,
 Latexmailto:[EMAIL PROTECTED]


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




Re: [PHP] Data Post or Get Variable Undefined

2002-06-21 Thread Latex Master

Hello Salman,

They have changed the method.
Turn global variables on in your php.ini

Friday, June 21, 2002, 4:41:30 PM, you wrote:

SA Hi,

SA In new version of php 4.2, I am trying to do post or get of data from html form to 
the php page. But it says undefined variable. Is there something different in new 
version for post and get. It
SA do have increased security I have read but how can I do post and get.

SA I have changed php INI file variable of cgi force redirect to 0 as PHP was not 
working for me on other values. But now cannot do post and get. Have read online help 
but couldnt figure out so
SA please help. How can I do post and get in php new installers.

SA OS : Windows

SA Statbat();



-- 
Best regards,
 Latexmailto:[EMAIL PROTECTED]


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