RE: [PHP] Attempted to unsubscribe to no avail

2004-12-13 Thread Jack . van . Zanen
look at the bottom of the emails you are getting. Specially the last
paragraph may be of interest

snip

 If you are receiving mail from one of the mailing lists, there should be
absolutely no reason that you would be unable to unsubscribe yourself from
the list, except for your ability to follow these directions. However, if
you find yourself unable to unsubscribe from the mailing list, send an email
to [EMAIL PROTECTED] Make sure to include the complete headers
from one of the messages you have received from the mailing list. Keep in
mind that there's a human being at the other end of that last email address,
so you'll have to be patient.

/snip

-Oorspronkelijk bericht-
Van: Scott Hamm [mailto:[EMAIL PROTECTED]
Verzonden: maandag 13 december 2004 14:45
Aan: [EMAIL PROTECTED]
Onderwerp: [PHP] Attempted to unsubscribe to no avail


GRR, I've tried in various and numerous ways to unsubscribe, even RTFM'd.
How do I unsubscribe?!

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

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



RE: [PHP] How to get 2 columns to display?

2004-12-06 Thread Jack . van . Zanen
can you maybe add some debug code to print out the value of $r just before
the if?
and just after the if

It looks at first glance to be correct, except you seem to be missing
opening TR (actually that may be your problem)

Jack

-Oorspronkelijk bericht-
Van: Aaron Wolski [mailto:[EMAIL PROTECTED]
Verzonden: maandag 6 december 2004 15:21
Aan: [EMAIL PROTECTED]
Onderwerp: [PHP] How to get 2 columns to display?


Hi guys,

I'm trying to get two columns of td/td to display side by side and
then go to a new row. I am using this code but nothing I seem to do is
working this far. 

?php
for ($r=0;$products = db_fetch($productsQuery);$r++)
{
?
  td align=centera href=?php echo $base_url; ?products/?php
echo $category; ?/?php echo $products['name_url']; ?
class=product_linkimg src=?php echo $base_url;
?product_images/thumbs/?php echo $products['thumb']; ? border=0
width=159br?php echo $products['name']; ?/a/td ?php  if
((($r+1) % 2) == 0)
 {  
?
/tr
tr valign=top
?php
 }
}
?

What is happening with this code is I am getting results like:

tr
tdIMAGE HERE/td
tdIMAGE HERE/td
tdIMAGE HERE/td
tdIMAGE HERE/td
tdIMAGE HERE/td
/tr

What I WANT is:

tr
tdIMAGE HERE/td
tdIMAGE HERE/td
/tr
tdIMAGE HERE/td
tdIMAGE HERE/td
/tr
tdIMAGE HERE/td
td/td
/tr

ANY clue where I am going wrong?

Thanks so much.

Aaron

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

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



RE: [PHP] how to show errors in browser

2004-11-17 Thread Jack . van . Zanen
Hi 


In your PHP.INI there is a section that will take care of that

;;
; Error handling and logging ;
;;

; error_reporting is a bit-field.  Or each number up to get desired error
; reporting level
; E_ALL - All errors and warnings
; E_ERROR   - fatal run-time errors
; E_WARNING - run-time warnings (non-fatal errors)
; E_PARSE   - compile-time parse errors
; E_NOTICE  - run-time notices (these are warnings which often
result
; from a bug in your code, but it's possible that it was
; intentional (e.g., using an uninitialized variable and
; relying on the fact it's automatically initialized to
an
; empty string)
; E_CORE_ERROR  - fatal errors that occur during PHP's initial startup
; E_CORE_WARNING- warnings (non-fatal errors) that occur during PHP's
; initial startup
; E_COMPILE_ERROR   - fatal compile-time errors
; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
; E_USER_ERROR  - user-generated error message
; E_USER_WARNING- user-generated warning message
; E_USER_NOTICE - user-generated notice message
;
; Examples:
;
;   - Show all errors, except for notices
;
;error_reporting = E_ALL  ~E_NOTICE
;
;   - Show only errors
;
;error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
;
;   - Show all errors except for notices
;
error_reporting  =  E_ALL  ~E_NOTICE

-Original Message-
From: Rayan Lahoud [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 17, 2004 3:01 PM
To: [EMAIL PROTECTED]
Subject: [PHP] how to show errors in browser


Hy, i am opening php files from my browser. If there are some errors in the
php file i can not see what are the errors in the browser
 
Can anyone help please?


-
Do you Yahoo!?
 Discover all that's new in My Yahoo!

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



[PHP] PDFLIB error 2516

2004-11-05 Thread Jack . van . Zanen
Hi All,
I upgraded my test system to 4.3.9 (from 4.3.4) and now run into problems
with pdf creation. Scripts that ran fine before now return the following
error:

Fatal error: PDFlib error: [2516] PDF_findfont: Metrics data for font
'Arial' not found in d:\website\pdf_graph.php on line 50


Has anybody seen this before and knows of the solution? Google returned no
hits that solved the problem.

snip

pdf_open_file($pdf, d:\\website\\graphs.pdf);

pdf_set_info($pdf, Author, Automatically Generated);
pdf_set_info($pdf, Title, Management graphs);
pdf_set_info($pdf, Creator, Jacob A. van Zanen);
pdf_set_info($pdf, Subject, Management Graphs);



pdf_begin_page($pdf, 700, 600);
$bookmark1 = pdf_add_bookmark($pdf, Information for machine SBPXXA1);
$arial = pdf_findfont($pdf, Arial, host, 1); pdf_setfont($pdf, $arial,
12);  //-this is line 50
pdf_show_xy($pdf, 1Information for machine SBPXXA1 for $_POST[day]/
$_POST[month]/$_POST[year],50, 510); 


/snip



TiA

Jack van Zanen






RE: [PHP] PDFLIB error 2516

2004-11-05 Thread Jack . van . Zanen
Thx

That was it.

Anybody have any ideas as to why this behaviour changed??


Regards



Jack

-Original Message-
From: Tom Rogers [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 05, 2004 12:46 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] PDFLIB error 2516


Hi,

Friday, November 5, 2004, 8:18:16 PM, you wrote:
JvZnc Hi All,
JvZnc I upgraded my test system to 4.3.9 (from 4.3.4) and now run into 
JvZnc problems with pdf creation. Scripts that ran fine before now 
JvZnc return the following
JvZnc error:

JvZnc Fatal error: PDFlib error: [2516] PDF_findfont: Metrics data for 
JvZnc font 'Arial' not found in d:\website\pdf_graph.php on line 50


JvZnc Has anybody seen this before and knows of the solution? Google 
JvZnc returned no hits that solved the problem.

JvZnc snip

JvZnc pdf_open_file($pdf, d:\\website\\graphs.pdf);

JvZnc pdf_set_info($pdf, Author, Automatically Generated); 
JvZnc pdf_set_info($pdf, Title, Management graphs); 
JvZnc pdf_set_info($pdf, Creator, Jacob A. van Zanen); 
JvZnc pdf_set_info($pdf, Subject, Management Graphs);



JvZnc pdf_begin_page($pdf, 700, 600);
JvZnc $bookmark1 = pdf_add_bookmark($pdf, Information for machine 
JvZnc SBPXXA1); $arial = pdf_findfont($pdf, Arial, host, 1); 
JvZnc pdf_setfont($pdf, $arial, 12);  //-this is line 50
JvZnc pdf_show_xy($pdf, 1 Information for machine SBPXXA1 for
$_POST[day]/
JvZnc $_POST[month]/$_POST[year],50, 510);


JvZnc /snip



JvZnc TiA

JvZnc Jack van Zanen


You have to tell pdf where to find the font, I do it this way

pdf_set_parameter($pdf, FontOutline, Arial=/path/to/arial.ttf);

-- 
regards,
Tom

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



RE: [PHP] what am i doing wrong..??

2004-11-04 Thread Jack . van . Zanen
?php $_SERVER['PHP_SELF'] ? somehow keeps the $_GET variables. If you
change this to the real script name it seems to work

JACK

-Original Message-
From: Aalee [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 04, 2004 1:54 PM
To: [EMAIL PROTECTED]
Subject: [PHP] what am i doing wrong..??


Hi there please have a look the code below...I dont know wht am doing wrong
here... This code is suppose to show the number of jokes in a mysql database
and allows user to add a joke when the user clicks addjoke link. And when
the joke is added, it suppose to say that Joke inserted, Thank you and
list all the jokes below this line. So far am able to view all the jokes and
take the user to add joke page. But the problem is when the user clicks
insert joke button, it does not display the message Joke inserted, Thank
you and the jokes are not listed. Infact it does not give any error aswell,
it just stays on the add joke form page. I checked the database and no joke
is added. Working on PHP ver 4.3.8 with register_globals turned OFF and
Apache 1.3.31. MySQL ver 4.0.20a on winXP pro SP1. Recently i started using
registre_globals OFF and all these probs strted coming up. This code was
working fine with globals ON. But my hosting has it off. So need to do so. I
was able to fix all the other issues came coz of this global thing in this
code. But stuck on the issue i just mentioned. Any help would be GREATLY
appreciated.

?php
if (isset($_GET['addjoke'])){
?
form name=form1 method=post action=?php $_SERVER['PHP_SELF'] ?
  Type your joke :br
  textarea name=jokeText id=jokeText/textarea
   br
  input name=insert type=submit id=submit value=Insert Joke
/form


?php
 }
else { // start main else statement
if(isset ($_POST['insert'])) {
 $db = mysql_connect(localhost,homesite,test) ;
mysql_select_db(jokes,$db);  $query = mysql_query(INSERT INTO jokes SET
JokeText = '.$_POST['jokeText'].' ,  JokeDate = CURDATE() );  echo  Joke
inserted, Thank you BRBR;  echo mysql_error(); } $color1 = #66CCFF;
$color2 = #66CC99; $row_count = 1;

// -- Following lines list the jokes in the
database 
echo bH3 These are the jokes we have got so far/H3/B; $db =
mysql_connect(localhost,homesite,test)  or die(mysql_error());
mysql_select_db(jokes,$db); $sql = SELECT id, JokeText, JokeDate from
jokes; $query = mysql_query($sql); echo table border=1
   tr
tdbIDb/td
  tdbJoke Textb/td
  tdbJoke Dateb/td/tr;
while ($myrow = mysql_fetch_array($query))
 {
 $row_color = ($row_count % 2) ? $color1 : $color2;
  echotr bgcolor = $row_color.
  td. $myrow[id]./td.
  td. $myrow[JokeText]. /td.
  td. $myrow[JokeDate]./td/tr;
  $row_count++;
 }
echo /table;

$current_url = $_SERVER['PHP_SELF'];
echo(PA HREF=.$current_url.?addjoke=1 .Add a Joke!/A/P);


} // end main else statement
?

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

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



RE: [PHP] Cannot retrive the data ???

2004-11-01 Thread Jack . van . Zanen
Try

if($_POST[insert])

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 01, 2004 5:08 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Cannot retrive the data ???


Hi there,
Look at the following code please. I have  a mysql db setup and apache 
running. I have the register_globals=OFF on the php.ini file. The code is
suppose to show all the jokes in the databse and give user to enter jokes.
The code works fine when when the register_globals=ON in the php.ini file.
But for some reason it does not work when it is OFF. Infact when it is OFF
it give a blank page with no data retrieved from the databse and gives no
errors. Please help me.Code is below...

?php
if (isset($_GET[addjoke])){
?
form name=form1 method=post action=?php echo ($PHP_SELF); ?
  Type your joke :br
  textarea name=jokeText id=jokeText/textarea
   br
  input name=insert type=submit id=submit value=Insert Joke
/form

 
?php 
 }
 else {
 //'.$_POST['jokeText'].'
if($insert){
$db = mysql_connect(localhost,homesite,951753)  or
die(mysql_error()) ;
if (!$db){
echo  Cannot connect to MySQL server. Please check the server connection;
} mysql_select_db(jokes,$db); $query = mysql_query(INSERT INTO jokes SET
JokeText = '.$_POST['jokeText'].' ,
JokeDate = CURDATE() );
if(mysql_affected_rows($query) != 0){   
echo  Joke inserted, Thank you BRBR;
} 
else { echo Joke NOT entered. An error occured while entering; }

$color1 = #CCFFCC; 
$color2 = #BFD8BC; 
$row_count = 0;

// -- Following lines list the jokes  echo b
These are the jokes we have got so far/BBR; $db =
mysql_connect(localhost,homesite,951753)  or die(mysql_error());
mysql_select_db(jokes,$db);
$sql = SELECT id, JokeText, JokeDate from jokes;  
$query = mysql_query($sql);
echo table border=1
  tr
tdbIDb/td
tdbJoke Textb/td
tdbJoke Dateb/td/tr;
while ($myrow = mysql_fetch_array($query))
{
$row_color = ($row_count % 2) ? $color1 : $color2;
 echotr.
 td bgcolor=$row_color. $myrow[id]./td.
 td bgcolor=$row_color. $myrow[JokeText]. /td.
 td bgcolor=$row_color. $myrow[JokeDate]./td/tr;
// echo .$myrow[id].-- . $myrow[JokeText].   .
$myrow[Name].  .$myrow[Email]. BRBR;
 $row_count++; 
}
echo(PA HREF='$PHP_SELF?addjoke=1' .Add a Joke!/A/P);

}
?

Cheers Mike

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

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



RE: [PHP] Parsing a concatenated variable and string?

2004-10-29 Thread Jack . van . Zanen
Hi Paul


Try  print $instrument.number;

jack

-Original Message-
From: Paul Evans [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 29, 2004 9:45 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Parsing a concatenated variable and string?


Hi,

 I am new to PHP and cant seem to find a way to parse a concatenated string
and variable.

 To explain:

 I have a database to catalogue a composers works, one of the tables has a
list of instruments which I then access to dynamically display on a wep page
using checkboxes - if a particular instrument is used in the work then the
checkbox is checked.

 ?php

 //Select all instruments from the instrumentTbl in the correct order

 $resultInstrument = mysql_query(SELECT * FROM instrumentTbl ORDER BY
sort_order); 

 //Load them into an array

  if ($myrowInstrument = mysql_fetch_array($resultInstrument)) {  do {  echo
$myrowInstrument['instrument'];  echo : ;

 ?
  
 //This creates a checkbox for each instrument in the database

  input name=?php echo $myrowInstrument['instrument']; ?
type=checkbox value=?php echo $myrowInstrument['instrument']; ?

 So far so good.

 The problem I am having is when I want to insert the number of instruments
used in the work.


 input name=?php echo $myrowInstrument['instrument']; ?number
type=text size=3

 This snipet of code produces a dynamically created form where the user can
enter the number of instruments required. (Ie 2 flutes)  

 Here is a part of the form created from the code above for the instrument
Flute:

 input name=Flutenumber type=text size=3

 To process the information in this form I think I need to concatenate
$instrument with the string 'number'.  the only problem is that PHP reads
this literally and the output is just $Flutenumber and not the number
actually entered.

 Here is the code I have at the moment


 ?php

 $resultInstrument_id = mysql_query(SELECT * FROM instrumentTbl ORDER BY
sort_order); 

 while ($myrowInstrument_id = mysql_fetch_array($resultInstrument_id))
 {
 $instrument = $myrowInstrument_id['instrument'];

 if (strlen ($$instrument !='0'))
   { 
 //this works fine and gives a list of all the checked instruments  print
$$instrument;

 //this just outputs the literal interpretation ie it will print
$Flutenumber not the actual number entered on the form.

 print  $${$instrument}number;

 }
 }

 ?

 Any help would be greatly appreciated.

 Thanks,
 Paul.

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

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



[PHP] Regular expressions Q

2004-10-28 Thread Jack . van . Zanen
Hi All


I'm trying to achieve the following:

In a text string there may be a number of substrings that match my criteria.
I need to retrieve all of them.

This is what I have so far and works perfect for the first substring but
ignores the possibility of others. I need to know if there are more in the
string that match and if so need to have those.

ereg((([[:blank:]+]|^)[09][0-9][4789][0][0-9]{3}[abcABC]?),$zn[1],$zaakn
ummers1);


I thought that ereg would get all of them and store them in the array
$zaaknummers1 however this is not the case

PHP 4.3.4



What am I doing wrong here?


THX

Jack



RE: [PHP] Regular expressions Q

2004-10-28 Thread Jack . van . Zanen
Thx,


Just joined today, should have looked thru the archives first though.

Jack

-Original Message-
From: Alex Hogan [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 28, 2004 3:31 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Regular expressions Q


 ereg((([[:blank:]+]|^)[09][0-9][4789][0][0-9]{3}[abcABC]?),$zn[1],
 $zaakn
 ummers1);
 
 I thought that ereg would get all of them and store them in the array 
 $zaaknummers1 however this is not the case

I just asked a question similar to this the other day.
Try using;

preg_match_all((([[:blank:]+]|^)[09][0-9][4789][0][0-9]{3}[abcABC]?),
$zn[1], $zaaknummers1);




alex hogan

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