php-general Digest 1 Dec 2008 17:15:27 -0000 Issue 5820

2008-12-01 Thread php-general-digest-help

php-general Digest 1 Dec 2008 17:15:27 - Issue 5820

Topics (messages 283938 through 283943):

Re: Text To Speech Update
283938 by: Craige Leeder

Re: Trre/Drop Down quick app for testing database tbls
283939 by: Manuel Lemos

PHP - Jasper Report Integeration
283940 by: Johny John

Re: Parsing XML
283941 by: Peter Ford
283942 by: Per Jessen

XML RSS installation
283943 by: Joe Schoemann

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--
---BeginMessage---

Daniel P. Brown wrote:

Any/All:

For those of you who were asking about the PHP Text-To-Speech
system I had running, it's back online now.  If you have a few free
seconds, please take a look at http://www.pilotpig.net/txt2wav.php and
let me know if it's working for sure in your browser and on your OS.

With a bit more time being available to devote to non-paid
projects, and hopefully getting a bit better still in the next week or
so, I've had time to be able to work more with the PHP project and the
PHP-VOX.  When I make enough improvements to the installation routines
so that folks can easily do it on their own servers, I'll have the
source available for download.

Thanks, everyone.  Hope you're all enjoying the weekend.
  


I have to say, that is REALLY cool, and defiantly useful too. How long 
have you spent on it now?


- Craige
---End Message---
---BeginMessage---
Hello,

on 11/28/2008 02:19 PM bruce said the following:
 I've got a few tbls that I'm testing. I'd like to have a simple web app to
 be able to iterate through the tbls to test out what I have in them.
 
 I'd like to be able to have each tbl as a drop-down/select box, so I select
 from selecta, which lists items from TBL-A, which then uses the id from
 TBL-A, to get the items from TBL-B that matches. Selecting from drop-down
 for TBL-B, then gets me the list on TBL-C...
 
 I've got 3-4 tbls that are linked by their id.
 
 Rather than reinvent the wheel, I'm asking if anyone has a quick app that
 they can point to that I can extract/modify the functionality for my
 needs...

This is a frequent problem. You may want to take a look at this forms
generation class that comes with plug-in named linked select that
achieves precisely what you want.

http://www.phpclasses.org/formsgeneration

It can link 2 or more select inputs, without chaining limits. It can
switch to alternative set of options for one select when the previous
input value changes.

The alternative option sets may be defined statically, but there
variants of this plug-in to fetch options from MySQL databases or any
other database supported by Metabase or PEAR::MDB2 database abstraction
layers.

The plug-in may use AJAX to retrieve the alternative option sets from
the server without reloading the pages.

Here is a live demo:

http://www.meta-language.net/forms-examples.html?example=test_linked_select

Here you can see a tutorial video about the forms class with a section
about this plug-in:

http://www.phpclasses.org/browse/video/1/package/1/section/plugin-linked-select.html

Here you can see the slide presentation. Jump to slide 26 to check the
slide about this plug-in.

http://www.phpclasses.org/browse/video/3/package/1.html



-- 

Regards,
Manuel Lemos

Find and post PHP jobs
http://www.phpclasses.org/jobs/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
---End Message---
---BeginMessage---
Dear All,
Do any one know how to integrate PHP with Jasper Reports. I tried it..but
its says Unable to create Java Virtual Machine 
Please refer this link for more details.
http://jagadmaya.com/integration-phpjasperreports.html
-- 
Thanks  Regards,
Johny
www.phpshore.com
---End Message---
---BeginMessage---
Per Jessen wrote:
 Ashley Sheridan wrote:
 
 On Fri, 2008-11-28 at 10:15 +0100, Per Jessen wrote:
 Ashley Sheridan wrote:

 Do any of you have a copy of this extension, or failing that, a
 suggestion of how I can parse XML files without having to install
 anything on the remote server, as I do not have that level off
 access to it.
 Parsing XML is best done with XSL - if that's out of the question,
 you're in for a difficult time.


 /Per Jessen, Zürich


 XSL will only allow me to convert it into a different document format,
 which is not what I want as I need to keep a local copy of information
 in a database for searching and sorting purposes. Nathans class allows
 me to have the entire document put into an array tree, which is fine
 for what I need so far.
 
 That's cool, but XSL is still the more appropriate tool IMO.  It does
 exactly what you need - it parses and validates the XML document,
 allows you to extract the bits you need and in virtually any format you
 need - which could be a text 

Re: [PHP] Parsing XML

2008-12-01 Thread Peter Ford
Per Jessen wrote:
 Ashley Sheridan wrote:
 
 On Fri, 2008-11-28 at 10:15 +0100, Per Jessen wrote:
 Ashley Sheridan wrote:

 Do any of you have a copy of this extension, or failing that, a
 suggestion of how I can parse XML files without having to install
 anything on the remote server, as I do not have that level off
 access to it.
 Parsing XML is best done with XSL - if that's out of the question,
 you're in for a difficult time.


 /Per Jessen, Zürich


 XSL will only allow me to convert it into a different document format,
 which is not what I want as I need to keep a local copy of information
 in a database for searching and sorting purposes. Nathans class allows
 me to have the entire document put into an array tree, which is fine
 for what I need so far.
 
 That's cool, but XSL is still the more appropriate tool IMO.  It does
 exactly what you need - it parses and validates the XML document,
 allows you to extract the bits you need and in virtually any format you
 need - which could be a text document with SQL statements for piping to
 mysql. 
 
 
 /Per Jessen, Zürich
 

I'm with you on this, Per.
You could even use the XSL to construct a bunch of PHP which could be eval'd or
just read in as an include.
Or better yet, if you use the XSL classes, you can register PHP functions and
then call them within your XSL directly. That could potentially handle the
validation you required, and even do the database inserts.

I'm looking into using something like that on a project I'm currently working
on: maybe I can come up with some examples in a couple of days...

-- 
Peter Ford  phone: 01580 89
Developer   fax:   01580 893399
Justcroft International Ltd., Staplehurst, Kent

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



Re: [PHP] Parsing XML

2008-12-01 Thread Per Jessen
Peter Ford wrote:

 Per Jessen wrote:
 
 That's cool, but XSL is still the more appropriate tool IMO.  It does
 exactly what you need - it parses and validates the XML document,
 allows you to extract the bits you need and in virtually any format
 you need - which could be a text document with SQL statements for
 piping to mysql.
 
 
 /Per Jessen, Zürich
 
 
 I'm with you on this, Per.
 You could even use the XSL to construct a bunch of PHP which could be
 eval'd or just read in as an include.
 Or better yet, if you use the XSL classes, you can register PHP
 functions and then call them within your XSL directly. That could
 potentially handle the validation you required, and even do the
 database inserts.

Yep, that occured to me too. I think XSL can even do quite a bit of the
validation too.

 I'm looking into using something like that on a project I'm currently
 working on: maybe I can come up with some examples in a couple of
 days...

Here's one easy example -

we generate monthly reports for our customers based on the activities of
the most recent month.  The template is an OpenOffice document (well,
several in different languages), which is merged with the activity data
to produce the report in OOo format.  The data is extracted and
formatted as XML. 
The process looks roughly like this:

OOo:template + XML:data - apply XSL - OOo document.  (We then turn the
final OOo document into a PDF which is emailed).  

Of course the same could be achieved using PHP, but instead of a neat
XSL stylesheet, I would have a pile of custom PHP code.

IMO, when you have a need to parse XML or otherwise extract data from
XML, you need a really good reason to disregard XSL.  The only really
good reason I've heard so far was lack of XSL skills, which could be a
real issue.  The learning curve IS quite steep. 


/Per Jessen, Zürich


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



[PHP] XML RSS installation

2008-12-01 Thread Joe Schoemann
I previously had my web page hosted on a shared Apache server. The web hosts
installed the PEAR modules on the system for me.

I have now decided to go to Godaddy who have a shared Linux server.

They do not install PEAR modules and I have to do myself.

I found the go-pear.php program and managed to get it to install PEAR, but
the XML_RSS was not included.

I scratched around further and found there is a file called
XML_RSS-0.9.10.tar which I have downloaded to my PC.

I can upload it to my web site with FTP but I don't know where to put it or
what to do with it.

I have been at this for 3 days now and need some help, what must I do now to
get the RSS working. 

 

Yours truly,

 

Joe



Re: [PHP] XML RSS installation

2008-12-01 Thread Richard Heyes
 ...

You might be interested to know that with PEAR there is absolutely no
need to use the installer at all. You may find it easier not to. For
example the file you mentioned (XML_RSS) is here:

http://cvs.php.net/viewvc.cgi/pear/XML_RSS/RSS.php?revision=1.28view=co

You will need to replicate the directory structure, but that's not
exactly a chore. This is the way I use PEAR components - I don't use
the PEAR installer at all. Personally I think this way is far more
convenient. The installer may make it easier when installing larger
packages which have a fair few files, but personally I'd still go with
this method.

-- 
Richard Heyes

HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.rgraph.org (Updated November 29th)

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



Re: [PHP] Parsing XML

2008-12-01 Thread Ashley Sheridan
On Mon, 2008-12-01 at 11:28 +0100, Per Jessen wrote:
 Peter Ford wrote:
 
  Per Jessen wrote:
  
  That's cool, but XSL is still the more appropriate tool IMO.  It does
  exactly what you need - it parses and validates the XML document,
  allows you to extract the bits you need and in virtually any format
  you need - which could be a text document with SQL statements for
  piping to mysql.
  
  
  /Per Jessen, Zürich
  
  
  I'm with you on this, Per.
  You could even use the XSL to construct a bunch of PHP which could be
  eval'd or just read in as an include.
  Or better yet, if you use the XSL classes, you can register PHP
  functions and then call them within your XSL directly. That could
  potentially handle the validation you required, and even do the
  database inserts.
 
 Yep, that occured to me too. I think XSL can even do quite a bit of the
 validation too.
 
  I'm looking into using something like that on a project I'm currently
  working on: maybe I can come up with some examples in a couple of
  days...
 
 Here's one easy example -
 
 we generate monthly reports for our customers based on the activities of
 the most recent month.  The template is an OpenOffice document (well,
 several in different languages), which is merged with the activity data
 to produce the report in OOo format.  The data is extracted and
 formatted as XML. 
 The process looks roughly like this:
 
 OOo:template + XML:data - apply XSL - OOo document.  (We then turn the
 final OOo document into a PDF which is emailed).  
 
 Of course the same could be achieved using PHP, but instead of a neat
 XSL stylesheet, I would have a pile of custom PHP code.
 
 IMO, when you have a need to parse XML or otherwise extract data from
 XML, you need a really good reason to disregard XSL.  The only really
 good reason I've heard so far was lack of XSL skills, which could be a
 real issue.  The learning curve IS quite steep. 
 
 
 /Per Jessen, Zürich
 
 
I still disagree, as using XSL is essentially converting the XML to
another format, which is then being used by PHP. XSL is great for some
tasks, but for this, I think having a good PHP XMLDoc (or similar type
of) class is better.

On a slightly aside note though, how would you apply the XSL to the XML
using PHP? I know that you can have the stylesheet (XSL) called in from
within the XML document itself, but without being able to change that
XML document, how else can it be done? This could be quite useful to me
in the future.


Ash
www.ashleysheridan.co.uk


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



Re: [PHP] Parsing XML

2008-12-01 Thread Per Jessen
Ashley Sheridan wrote:

 I still disagree, as using XSL is essentially converting the XML to
 another format, 

Which is all you're doing when you're extracting parts of an XML
document.  

 which is then being used by PHP. XSL is great for some tasks, but for
 this, I think having a good PHP XMLDoc (or similar type of) class is
 better. 

Ash, I'd really like to hear you argue why you think so.

I can't help thinking it's a bit like saying I know there is a compiler
for C-code, but I prefer to convert to assembler by using PHP.  I know
it's not quite that bad, but I hope you get my point.

 On a slightly aside note though, how would you apply the XSL to the
 XML using PHP? 

Roughly like this:  (this is from a project I'm currently working on).

--
// create the xslt processor object
if ( FALSE===($xp=new XSLTProcessor()) ) { print unable to create xslt
engine; return FALSE; }

// Load the XML source
$xml=new DOMDocument;
$xml-loadXML($list);

// then load the XSL stylesheet
$xsl=new DOMDocument;
$xsl-load('getfilebypos.xsl');

// attach the stylesheet
$xp-importStyleSheet($xsl);

$pos=$_GET['pos'];
$xp-setParameter('', array('pos' = $_GET['pos']) );

$file=$xp-transformToXML($xml);


$file in this case is just a single filename, no XML.  My input data has
a list of filenames, the 'pos' argument from the URI identifies one I
need to process.


/Per Jessen, Zürich


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



Re: [PHP] Parsing XML

2008-12-01 Thread Ashley Sheridan
On Mon, 2008-12-01 at 21:35 +0100, Per Jessen wrote:
 Ashley Sheridan wrote:
 
  I still disagree, as using XSL is essentially converting the XML to
  another format, 
 
 Which is all you're doing when you're extracting parts of an XML
 document.  
 
  which is then being used by PHP. XSL is great for some tasks, but for
  this, I think having a good PHP XMLDoc (or similar type of) class is
  better. 
 
 Ash, I'd really like to hear you argue why you think so.
 
 I can't help thinking it's a bit like saying I know there is a compiler
 for C-code, but I prefer to convert to assembler by using PHP.  I know
 it's not quite that bad, but I hope you get my point.
 
  On a slightly aside note though, how would you apply the XSL to the
  XML using PHP? 
 
 Roughly like this:  (this is from a project I'm currently working on).
 
 --
 // create the xslt processor object
 if ( FALSE===($xp=new XSLTProcessor()) ) { print unable to create xslt
 engine; return FALSE; }
 
 // Load the XML source
 $xml=new DOMDocument;
 $xml-loadXML($list);
 
 // then load the XSL stylesheet
 $xsl=new DOMDocument;
 $xsl-load('getfilebypos.xsl');
 
 // attach the stylesheet
 $xp-importStyleSheet($xsl);
 
 $pos=$_GET['pos'];
 $xp-setParameter('', array('pos' = $_GET['pos']) );
 
 $file=$xp-transformToXML($xml);
 
 
 $file in this case is just a single filename, no XML.  My input data has
 a list of filenames, the 'pos' argument from the URI identifies one I
 need to process.
 
 
 /Per Jessen, Zürich
 
 
So here you're advocating loading the XML document into PHP to add an
element, then convert the XML into something else, for PHP to read back
in (not forgetting my original question said I need PHP to do some
operations on the XML.) Do you see why I just wanted a way to extract
the parts of the XML document I needed? This example is actually making
something unnecessarily complex just because XSL is deemed to be the
best way to work with XML.

I'm not saying that XSL is a bad thing, I've used it many times before
to convert various document formats, I just think that for what I
needed, XSL doesn't really suit the task at hand.


Ash
www.ashleysheridan.co.uk


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



[PHP] question about corrupt db?

2008-12-01 Thread Terion Miller
could a corrupt db make php pages stop functioning?
My pages no longer go anywhere, I went back found the original scripts and
still it didn't fix the problem (thought I had messed the code up) so it has
to be something external of the code its doing this locally on my box and on
the live server.

thanks
terion


Re: [PHP] Parsing XML

2008-12-01 Thread Per Jessen
Ashley Sheridan wrote:

 Roughly like this:  (this is from a project I'm currently working
 on).
 
 --
 // create the xslt processor object
 if ( FALSE===($xp=new XSLTProcessor()) ) { print unable to create
 xslt engine; return FALSE; }
 
 // Load the XML source
 $xml=new DOMDocument;
 $xml-loadXML($list);
 
 // then load the XSL stylesheet
 $xsl=new DOMDocument;
 $xsl-load('getfilebypos.xsl');
 
 // attach the stylesheet
 $xp-importStyleSheet($xsl);
 
 $pos=$_GET['pos'];
 $xp-setParameter('', array('pos' = $_GET['pos']) );
 
 $file=$xp-transformToXML($xml);
 
 
 $file in this case is just a single filename, no XML.  My input data
 has a list of filenames, the 'pos' argument from the URI identifies
 one I need to process.
 
 
 /Per Jessen, Zürich
 
 
 So here you're advocating loading the XML document into PHP to add an
 element, then convert the XML into something else, for PHP to read
 back in (not forgetting my original question said I need PHP to do
 some operations on the XML.) 

No, not at all.  1) no element is added, 2) the document is not
loaded 'into' PHP and 3) PHP 'reads back' output of about 30 bytes (a
filename + path). 
None of the XSL+XML happens inside of PHP - it's done through the XSL
extension which is essentially all calls to libxslt. 

 Do you see why I just wanted a way to extract the parts of the XML
 document I needed? This example is actually making something
 unnecessarily complex just because XSL is deemed to be the best way to
 work with XML. 

Ash, my example above extracts a single element (specified by 'pos')
from an XML-document - it's all done by a standards-compliant XSLT
style-sheet, and very effectively so.  The 8 lines of PHP code to
invoke the XSL conversion are virtually 'standard' too.  I'm having a
hard time appreciating why that is better done by combining
somebodyelses custom code with your own custom code.

 I'm not saying that XSL is a bad thing, I've used it many times before
 to convert various document formats, I just think that for what I
 needed, XSL doesn't really suit the task at hand.

I understand what you're saying, I just haven't heard a good argument
yet.

Gotta go watch Dr. House on the telly now.  I'll be back tomorow
morning.


/Per Jessen, Zürich


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



Re: [PHP] question about corrupt db?

2008-12-01 Thread Micah Gersten
Terion Miller wrote:
 could a corrupt db make php pages stop functioning?
 My pages no longer go anywhere, I went back found the original scripts and
 still it didn't fix the problem (thought I had messed the code up) so it has
 to be something external of the code its doing this locally on my box and on
 the live server.

 thanks
 terion

   
Have you checked the PHP error logs?

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



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



Re: [PHP] question about corrupt db?

2008-12-01 Thread Ashley Sheridan
On Mon, 2008-12-01 at 15:12 -0600, Micah Gersten wrote:
 Terion Miller wrote:
  could a corrupt db make php pages stop functioning?
  My pages no longer go anywhere, I went back found the original scripts and
  still it didn't fix the problem (thought I had messed the code up) so it has
  to be something external of the code its doing this locally on my box and on
  the live server.
 
  thanks
  terion
 

 Have you checked the PHP error logs?
 
 Thank you,
 Micah Gersten
 onShore Networks
 Internal Developer
 http://www.onshore.com
 
 
 
Also, have you manually checked the DB to see if it as you suspect,
corrupt?


Ash
www.ashleysheridan.co.uk


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



Re: [PHP] question about corrupt db?

2008-12-01 Thread Terion Miller
On Mon, Dec 1, 2008 at 3:12 PM, Micah Gersten [EMAIL PROTECTED] wrote:

 Terion Miller wrote:
  could a corrupt db make php pages stop functioning?
  My pages no longer go anywhere, I went back found the original scripts
 and
  still it didn't fix the problem (thought I had messed the code up) so it
 has
  to be something external of the code its doing this locally on my box and
 on
  the live server.
 
  thanks
  terion
 
 
 Have you checked the PHP error logs?

 Thank you,
 Micah Gersten
 onShore Networks
 Internal Developer
 http://www.onshore.com

   I put this:



 ini_set('error_reporting', E_ALL);
 ini_set('display_errors', true);

in the top of the pages but no errors are showing


Re: [PHP] question about corrupt db?

2008-12-01 Thread Chris

Terion Miller wrote:

could a corrupt db make php pages stop functioning?
My pages no longer go anywhere, I went back found the original scripts and
still it didn't fix the problem (thought I had messed the code up) so it has
to be something external of the code its doing this locally on my box and on
the live server.


If it's mysql, use mysqlcheck - 
http://dev.mysql.com/doc/refman/5.0/en/mysqlcheck.html


--
Postgresql  php tutorials
http://www.designmagick.com/


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



RE: [PHP] question about corrupt db?

2008-12-01 Thread Wolf


-Original Message-
From: Terion Miller [EMAIL PROTECTED]
Sent: Monday, December 01, 2008 4:23 PM
To: Micah Gersten [EMAIL PROTECTED]
Cc: PHP General php-general@lists.php.net
Subject: Re: [PHP] question about corrupt db?

On Mon, Dec 1, 2008 at 3:12 PM, Micah Gersten [EMAIL PROTECTED] wrote:

 Terion Miller wrote:
  could a corrupt db make php pages stop functioning?
  My pages no longer go anywhere, I went back found the original scripts
 and
  still it didn't fix the problem (thought I had messed the code up) so it
 has
  to be something external of the code its doing this locally on my box and
 on
  the live server.
 
  thanks
  terion
 
 
 Have you checked the PHP error logs?

 Thank you,
 Micah Gersten
 onShore Networks
 Internal Developer
 http://www.onshore.com

   I put this:



 ini_set('error_reporting', E_ALL);
 ini_set('display_errors', true);

in the top of the pages but no errors are showing
--

Then that answer would be no

You need to actually look at your error logs as if the server is set up right 
it won,'t allow ini bypasses.

Wolf

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



Re: [PHP] question about corrupt db?

2008-12-01 Thread Terion Miller
On Mon, Dec 1, 2008 at 3:40 PM, Wolf [EMAIL PROTECTED] wrote:



 -Original Message-
 From: Terion Miller [EMAIL PROTECTED]
 Sent: Monday, December 01, 2008 4:23 PM
 To: Micah Gersten [EMAIL PROTECTED]
 Cc: PHP General php-general@lists.php.net
 Subject: Re: [PHP] question about corrupt db?

 On Mon, Dec 1, 2008 at 3:12 PM, Micah Gersten [EMAIL PROTECTED] wrote:

  Terion Miller wrote:
   could a corrupt db make php pages stop functioning?
   My pages no longer go anywhere, I went back found the original scripts
  and
   still it didn't fix the problem (thought I had messed the code up) so
 it
  has
   to be something external of the code its doing this locally on my box
 and
  on
   the live server.
  
   thanks
   terion
  
  
  Have you checked the PHP error logs?
 
  Thank you,
  Micah Gersten
  onShore Networks
  Internal Developer
  http://www.onshore.com
 
I put this:



  ini_set('error_reporting', E_ALL);
  ini_set('display_errors', true);

 in the top of the pages but no errors are showing
 --

 Then that answer would be no

 You need to actually look at your error logs as if the server is set up
 right it won,'t allow ini bypasses.

 Wolf

I can't find any error logs, I've looked in the inetpub folder, the php
folder the IIS services admin 


Re: [PHP] question about corrupt db?

2008-12-01 Thread Ashley Sheridan
On Mon, 2008-12-01 at 15:53 -0600, Terion Miller wrote:
 On Mon, Dec 1, 2008 at 3:40 PM, Wolf [EMAIL PROTECTED] wrote:
 
 
 
  -Original Message-
  From: Terion Miller [EMAIL PROTECTED]
  Sent: Monday, December 01, 2008 4:23 PM
  To: Micah Gersten [EMAIL PROTECTED]
  Cc: PHP General php-general@lists.php.net
  Subject: Re: [PHP] question about corrupt db?
 
  On Mon, Dec 1, 2008 at 3:12 PM, Micah Gersten [EMAIL PROTECTED] wrote:
 
   Terion Miller wrote:
could a corrupt db make php pages stop functioning?
My pages no longer go anywhere, I went back found the original scripts
   and
still it didn't fix the problem (thought I had messed the code up) so
  it
   has
to be something external of the code its doing this locally on my box
  and
   on
the live server.
   
thanks
terion
   
   
   Have you checked the PHP error logs?
  
   Thank you,
   Micah Gersten
   onShore Networks
   Internal Developer
   http://www.onshore.com
  
 I put this:
 
 
 
   ini_set('error_reporting', E_ALL);
   ini_set('display_errors', true);
 
  in the top of the pages but no errors are showing
  --
 
  Then that answer would be no
 
  You need to actually look at your error logs as if the server is set up
  right it won,'t allow ini bypasses.
 
  Wolf
 
 I can't find any error logs, I've looked in the inetpub folder, the php
 folder the IIS services admin 

IIS has an option that lets you view the websites you have set up (I
believe you can get to it from right-clicking My Computer and selecting
Manage.) Select the site you are having problems with, and view the
properties for it. One of the tabs (I forget which exactly) tells you
where the error logs are for this site.


Ash
www.ashleysheridan.co.uk


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



Re: [PHP] question about corrupt db?

2008-12-01 Thread Terion Miller
On Mon, Dec 1, 2008 at 4:20 PM, Ashley Sheridan [EMAIL PROTECTED]wrote:

 On Mon, 2008-12-01 at 15:53 -0600, Terion Miller wrote:
  On Mon, Dec 1, 2008 at 3:40 PM, Wolf [EMAIL PROTECTED] wrote:
 
  
  
   -Original Message-
   From: Terion Miller [EMAIL PROTECTED]
   Sent: Monday, December 01, 2008 4:23 PM
   To: Micah Gersten [EMAIL PROTECTED]
   Cc: PHP General php-general@lists.php.net
   Subject: Re: [PHP] question about corrupt db?
  
   On Mon, Dec 1, 2008 at 3:12 PM, Micah Gersten [EMAIL PROTECTED]
 wrote:
  
Terion Miller wrote:
 could a corrupt db make php pages stop functioning?
 My pages no longer go anywhere, I went back found the original
 scripts
and
 still it didn't fix the problem (thought I had messed the code up)
 so
   it
has
 to be something external of the code its doing this locally on my
 box
   and
on
 the live server.

 thanks
 terion


Have you checked the PHP error logs?
   
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com
   
  I put this:
  
  
  
ini_set('error_reporting', E_ALL);
ini_set('display_errors', true);
  
   in the top of the pages but no errors are showing
   --
  
   Then that answer would be no
  
   You need to actually look at your error logs as if the server is set up
   right it won,'t allow ini bypasses.
  
   Wolf
  
  I can't find any error logs, I've looked in the inetpub folder, the php
  folder the IIS services admin 

 IIS has an option that lets you view the websites you have set up (I
 believe you can get to it from right-clicking My Computer and selecting
 Manage.) Select the site you are having problems with, and view the
 properties for it. One of the tabs (I forget which exactly) tells you
 where the error logs are for this site.


 Ash
 www.ashleysheridan.co.uk


wow not there either, is it possible the person in this job before me just
removed the logs and the servers capability to log? like there is no
usr/bin/log file or anything like that (went to the apache site) and in the
IIS install I went thru everything and can't find a thing about error
logs...OMG pulling out my hair.


Re: [PHP] question about corrupt db?

2008-12-01 Thread ceo

Maybe try the normal Windows System Logs?



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



Re: [PHP] question about corrupt db?

2008-12-01 Thread Ashley Sheridan
On Mon, 2008-12-01 at 16:29 -0600, Terion Miller wrote:
 
 
 On Mon, Dec 1, 2008 at 4:20 PM, Ashley Sheridan
 [EMAIL PROTECTED] wrote:
 
 On Mon, 2008-12-01 at 15:53 -0600, Terion Miller wrote:
  On Mon, Dec 1, 2008 at 3:40 PM, Wolf [EMAIL PROTECTED]
 wrote:
 
  
  
   -Original Message-
   From: Terion Miller [EMAIL PROTECTED]
   Sent: Monday, December 01, 2008 4:23 PM
   To: Micah Gersten [EMAIL PROTECTED]
   Cc: PHP General php-general@lists.php.net
   Subject: Re: [PHP] question about corrupt db?
  
   On Mon, Dec 1, 2008 at 3:12 PM, Micah Gersten
 [EMAIL PROTECTED] wrote:
  
Terion Miller wrote:
 could a corrupt db make php pages stop functioning?
 My pages no longer go anywhere, I went back found the
 original scripts
and
 still it didn't fix the problem (thought I had messed
 the code up) so
   it
has
 to be something external of the code its doing this
 locally on my box
   and
on
 the live server.

 thanks
 terion


Have you checked the PHP error logs?
   
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com
   
  I put this:
  
  
  
ini_set('error_reporting', E_ALL);
ini_set('display_errors', true);
  
   in the top of the pages but no errors are showing
   --
  
   Then that answer would be no
  
   You need to actually look at your error logs as if the
 server is set up
   right it won,'t allow ini bypasses.
  
   Wolf
  
  I can't find any error logs, I've looked in the inetpub
 folder, the php
  folder the IIS services admin 
 
 
 IIS has an option that lets you view the websites you have set
 up (I
 believe you can get to it from right-clicking My Computer and
 selecting
 Manage.) Select the site you are having problems with, and
 view the
 properties for it. One of the tabs (I forget which exactly)
 tells you
 where the error logs are for this site.
 
 
 Ash
 www.ashleysheridan.co.uk
 
 
 wow not there either, is it possible the person in this job before me
 just removed the logs and the servers capability to log? like there is
 no usr/bin/log file or anything like that (went to the apache site)
 and in the IIS install I went thru everything and can't find a thing
 about error logs...OMG pulling out my hair.
Well, /usr/bin/log is for Apache on Linux, so won't be of any use to you
with IIS on Windows!

Stupid question, but have you searched for all *.log files? As far as I
know, you can't stop the server logging, and I think IIS locks the logs
to prevent accidental deletion. Generally speaking, the logs will be
pretty large files (depending on how busy your website is) if that helps
you narrow down your search.


Ash
www.ashleysheridan.co.uk


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



[PHP] Re: Countries and Timezones

2008-12-01 Thread Jonesy
On Mon, 01 Dec 2008 23:02:50 +0100, franzemmanuel wrote:

 For those who are interested in Countries and timezones.

 I needed to have the list of all the countries in the world and the 
 timezones by country without redundancy.

I don't see Bonaire.

Jonesy
-- 
  Marvin L Jones| jonz  | W3DHJ  | linux
   38.24N  104.55W  |  @ config.com | Jonesy |  OS/2
* Killfiling google  banter.com: jonz.net/ng.htm


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



Re: [PHP] Parsing XML

2008-12-01 Thread Nathan Rixham

Per Jessen wrote:

Ashley Sheridan wrote:

[/snip] :p

XSL(T)
an xslt processor, along with an XSLT stylesheet, should be used to 
transform XML documents in to other XML, human readable or structured 
documents.


DOM
a class implementing the DOM interface should be used to traverse, 
analyse and extract information from an HTML or valid XML document for 
use in a computer program or to convert values to there primitive 
counterparts.


E4X
ideally E4X should be used where available as this provides native XML 
support, treating xml documents as primitive types and thus providing a 
faster, more acceptable way of using XML as building blocks in a 
computer program.


PHP Support
As far as I am aware PHP does not have any kind of supoort for 
ECMAScript let alone E4X so this can be removed from the discussion as 
quickly as it was entered. Leaving just XSL and DOM.


Non programmatic XML usage:
For all non programatic usage of XML documents (ie transforming the 
document in to html, a human readable document or another xml structure) 
then XSLT should be used.

Examples:
-Integrating the data from an RSS feed into an (X)HTML page and 
outputing it to a client application (non persistant stuctured document)
-Converting an XML Packet into an OOo document and saving it in a file 
system (persistant stuctured document)


Programmatic XML Usage:
For all programmatic usage of XML, when you need to take the data from 
an XML document and use node or attribute values in a program, then the 
DOM API should be used.

Examples:
-Extracting the structured object data encapsulated in a SOAP response 
and using it to instantiate a class for further usage. (non persitant 
structured data for use by a computer program)
-Converting the data values in a structured XML document, (lets say from 
the WOW Armory), into primitive values and then persiting the data into 
database tables. (persitant structured data for use by a computer program)


Grey Areas:
If you are using an ORM which uses XML schemas to define data objects 
then xslt may be the more appropriate choice, this would probably incur 
an extra XSL transformation to then convert the ORM's schema into an object.
One could argue that XSLT could be used to transform the XML document in 
to an SQL string, however this would not allow (or certainly limited 
allowance of) programatic manipulation / validation of the data prior to 
 injection into the SQL string.


Alternatives:
Regex or string parsing on an XML document can often lead to far faster 
but less reliable extraction of data for use in a script, probably so 
common in PHP as it's loosley typed language :p Obviously though if the 
XML document structre changes, you're pretty much stuffed - thus any 
form of native or strongly typed support is a far better option.


Suggestion:
Ashley, TBH the approach I'd take (if I had time) would be to create 
class(es) for the data, then create XML documents representing the 
object structure of each class, write methods using the DOM API to 
extract data from my XML documents and instatiate the class(es) with it. 
At this point I'd have an app that need never change. Then I'd drop in a 
simple XSLT stylesheet to transform the remote XML document in to my 
local structured xml documents and use the XSL processor to run this 
transform. Thus if ever the remote document structure changed all I'd 
have to do is quickly edit the XSLT stylesheet.


But whatever you're cool with, a simple regex xml to array convertor is 
normally the fastest and most transportable way of doing this (ie it'll 
generally work on php 4 and 5 on any server); and when you're not using 
a pre-compiled language you need to give much weight to these things.


Regards!

Nath

[omg i must be bored]

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



[PHP] category and sub category traversal

2008-12-01 Thread VamVan
Hello,

I need some help in figuring out this logic.

I have two tables one for category and other for category_hierarchy.
category_hirerarchy has a column to determine the parent.

So the query I have to retrieve tree of one specific category is:

SELECT t.tid, t.*, parent FROM term_data t INNER JOIN term_hierarchy h ON
t.tid = h.tid WHERE t.vid = 16 ORDER BY weight, name;

The ones with parent = 0 is the top category

Now I need to prepare an associative array with parent child relation.

So bascially I need to retrieve [parentID] = array('childID', 'chidName')

Can anyone shed some light on the logic involved in preparation of this
array with out using multiple sql queries?

Thanks


Re: [PHP] question about corrupt db?

2008-12-01 Thread Nathan Rixham

Ashley Sheridan wrote:

On Mon, 2008-12-01 at 16:29 -0600, Terion Miller wrote:


On Mon, Dec 1, 2008 at 4:20 PM, Ashley Sheridan
[EMAIL PROTECTED] wrote:

On Mon, 2008-12-01 at 15:53 -0600, Terion Miller wrote:

 On Mon, Dec 1, 2008 at 3:40 PM, Wolf [EMAIL PROTECTED]
wrote:

 
 
  -Original Message-
  From: Terion Miller [EMAIL PROTECTED]
  Sent: Monday, December 01, 2008 4:23 PM
  To: Micah Gersten [EMAIL PROTECTED]
  Cc: PHP General php-general@lists.php.net
  Subject: Re: [PHP] question about corrupt db?
 
  On Mon, Dec 1, 2008 at 3:12 PM, Micah Gersten
[EMAIL PROTECTED] wrote:
 
   Terion Miller wrote:
could a corrupt db make php pages stop functioning?
My pages no longer go anywhere, I went back found the
original scripts
   and
still it didn't fix the problem (thought I had messed
the code up) so
  it
   has
to be something external of the code its doing this
locally on my box
  and
   on
the live server.
   
thanks
terion
   
   
   Have you checked the PHP error logs?
  
   Thank you,
   Micah Gersten
   onShore Networks
   Internal Developer
   http://www.onshore.com
  
 I put this:
 
 
 
   ini_set('error_reporting', E_ALL);
   ini_set('display_errors', true);
 
  in the top of the pages but no errors are showing
  --
 
  Then that answer would be no
 
  You need to actually look at your error logs as if the
server is set up
  right it won,'t allow ini bypasses.
 
  Wolf
 
 I can't find any error logs, I've looked in the inetpub
folder, the php
 folder the IIS services admin 


IIS has an option that lets you view the websites you have set

up (I
believe you can get to it from right-clicking My Computer and
selecting
Manage.) Select the site you are having problems with, and
view the
properties for it. One of the tabs (I forget which exactly)
tells you
where the error logs are for this site.


Ash

www.ashleysheridan.co.uk



wow not there either, is it possible the person in this job before me
just removed the logs and the servers capability to log? like there is
no usr/bin/log file or anything like that (went to the apache site)
and in the IIS install I went thru everything and can't find a thing
about error logs...OMG pulling out my hair.

Well, /usr/bin/log is for Apache on Linux, so won't be of any use to you
with IIS on Windows!

Stupid question, but have you searched for all *.log files? As far as I
know, you can't stop the server logging, and I think IIS locks the logs
to prevent accidental deletion. Generally speaking, the logs will be
pretty large files (depending on how busy your website is) if that helps
you narrow down your search.


Ash
www.ashleysheridan.co.uk



just turn display errors on and set reporting to E_ALL ? save mucking 
around (although it is normally a good idea to know where you're log 
files are) :p


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



[PHP] Re: Voting methodology

2008-12-01 Thread Shawn McKenzie
tedd wrote:
 Hi gang:
 
 What methodology would be the best for online voting?
 
 I have a client who is a Union and they want members to vote online, but
 don't want someone to stuff the voting box.
 
 I have some ideas of my own, but would like to hear what you people
 would recommend.
 
 Cheers,
 
 tedd
 

Being a union I would expect that they want some way to control the
stuffing to their advantage.  :-)

-- 
Thanks!
-Shawn
http://www.spidean.com

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



[PHP] piecing together basic knowledge of paypal nvp api PHP - to work together

2008-12-01 Thread Govinda

Hi everyone

I have to produce just now, quickly, and so bridge 2 things I still  
know very little about (PHP and paypal), so I'll have to show my  
ignorance here.


Anyone who has experience with the paypal nvp api, maybe you can help  
me?:


I am successfully using the sample scripts paypal provides, but moving  
towards our own solution, I am making a link (the paypal express  
checkout button) from our shopping cart page to another page on our  
site where we do stuff and then redirect to the nvp api.  I want to  
stick the payment amount (and other things) in that link's parameters,  
but then it is hackable (i.e. bad).  My first thought is that i need  
to read about PHP sessions (which I have never done), so I can store  
stuff that I need to associate with the user's cart, but have it from  
the user, but then I thought I should start here to see if anyone can  
just tell me what you have done with this.  I have so much homework to  
do I would like to start with what will actually solve my issues now  
rather than read the whole library just to complete this assignment.


Thanks,
-Govinda

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



[PHP] Re: Countries and Timezones

2008-12-01 Thread franzemmanuel

Jonesy a écrit :

On Mon, 01 Dec 2008 23:02:50 +0100, franzemmanuel wrote:

For those who are interested in Countries and timezones.

I needed to have the list of all the countries in the world and the 
timezones by country without redundancy.


I don't see Bonaire.

Jonesy


Hi Jonesy,
Thank you for your words.
I think that Bonaire is part of the Netherlands Antilles.

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



Re: [PHP] piecing together basic knowledge of paypal nvp api PHP - to work together

2008-12-01 Thread dg


On Dec 1, 2008, at 5:50 PM, Govinda wrote:

I am successfully using the sample scripts paypal provides, but  
moving towards our own solution,


You might have better luck with custom solutions for Paypal at: 
http://www.paypaldeveloper.com/pdn/

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



Re: [PHP] category and sub category traversal

2008-12-01 Thread Chris

VamVan wrote:

Hello,

I need some help in figuring out this logic.

I have two tables one for category and other for category_hierarchy.
category_hirerarchy has a column to determine the parent.

So the query I have to retrieve tree of one specific category is:

SELECT t.tid, t.*, parent FROM term_data t INNER JOIN term_hierarchy h ON
t.tid = h.tid WHERE t.vid = 16 ORDER BY weight, name;

The ones with parent = 0 is the top category

Now I need to prepare an associative array with parent child relation.

So bascially I need to retrieve [parentID] = array('childID', 'chidName')

Can anyone shed some light on the logic involved in preparation of this
array with out using multiple sql queries?


What are 'tid' and the other columns? We can't see your schema so unless 
you explain what columns you need to include, we can't help.


Not really a php question either.

--
Postgresql  php tutorials
http://www.designmagick.com/


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



[PHP] Which is the right list?

2008-12-01 Thread Geek (de=German top level domain)
Hi everyone,

Sorry for my stupidity, but I couldn't see which of the lists is the right
one to know about important news and or features that I might not think or
be aware about for PHP. I'm a PHP developer, mainly using the Symfony
framework and would like to know about important developments, new stuff and
interesting suggestions. This seems to be more of a catch all list.

Regards and a special hello to all those out there who will answer my
questions.
Tim


RE: [PHP] category and sub category traversal

2008-12-01 Thread bruce
hey vamvan...

you might pop this to the mysql email list as well, if you haven't already!

[EMAIL PROTECTED]


-Original Message-
From: VamVan [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2008 5:13 PM
To: php List
Subject: [PHP] category and sub category traversal


Hello,

I need some help in figuring out this logic.

I have two tables one for category and other for category_hierarchy.
category_hirerarchy has a column to determine the parent.

So the query I have to retrieve tree of one specific category is:

SELECT t.tid, t.*, parent FROM term_data t INNER JOIN term_hierarchy h ON
t.tid = h.tid WHERE t.vid = 16 ORDER BY weight, name;

The ones with parent = 0 is the top category

Now I need to prepare an associative array with parent child relation.

So bascially I need to retrieve [parentID] = array('childID', 'chidName')

Can anyone shed some light on the logic involved in preparation of this
array with out using multiple sql queries?

Thanks


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



[PHP] Multiple MySQL INSERT

2008-12-01 Thread ddg2sailor

Hi People

My real problem is that I dont know code. I can sort of edit it in a sloppy
more or less works fashion. Any help would be great.

This is the code Im having problems with:


//Example//

$id = 0 + $_GET[id];
$md5 = $_GET[secret];




$gig = 1;
$giveupload = $gig*1024*1024*1024;

$res = mysql_query(SELECT passhash, editsecret, status FROM users WHERE id
= $id);
$row = mysql_fetch_array($res);



$res = mysql_query(SELECT passhash, editsecret, status FROM users WHERE id
= $id);
$row = mysql_fetch_array($res);


mysql_query(UPDATE users SET status='confirmed', uploaded = $giveupload );

//send pm to new user

{

$msg = sqlesc(Hello and welcome to Cyber Drive In you have been
given a 1gb head start to help your ratio. .we are a strict but fair site
and our warning are based on the torrent ratio not the global just because
you have a good ratio dont mean you can hit and run if you do hit and run
your downloads maybe disabled even if your global ratio is fine..so enjoy
our free 1gb gift rules are seed what you take or for 72 hours..plz read the
rules and facts now you have joined our friendly community);
$added = sqlesc(get_date_time());
$subject = sqlesc(Welcome to Cyber Drive In);
mysql_query(INSERT INTO messages (sender, receiver, subject, msg,
added) VALUES (0, $id, $subject, $msg, $added));


echo $SQL;
}


//end example//

This does confirm the user (without email , if you call it confirmed)
It does add 1gig to the new account.

However it dosent seem to want to insert into messages and by doing such
send a pm to the user defined in $id. I know this is very basic But a
friend of mine asked me to help him with his test site. Now I know a bit of
html and Im learning a bit of php as I go But the MySQL is like maertian
to me. :)

Sailor
-- 
View this message in context: 
http://www.nabble.com/Multiple-MySQL-INSERT-tp20786333p20786333.html
Sent from the PHP - General mailing list archive at Nabble.com.


Re: [PHP] Which is the right list?

2008-12-01 Thread Chris

Geek (de=German top level domain) wrote:

Hi everyone,

Sorry for my stupidity, but I couldn't see which of the lists is the right
one to know about important news and or features that I might not think or
be aware about for PHP. I'm a PHP developer, mainly using the Symfony
framework and would like to know about important developments, new stuff and
interesting suggestions. This seems to be more of a catch all list.


This list is for I have a problem, can someone help me type questions.

If you want general announcements (new versions, stuff about security 
issues I guess), join the announcements list 
(http://www.php.net/mailing-lists.php).


For symfony, look at their site: http://www.symfony-project.org/community

If you want other general stuff, you can also look at 
http://www.planet-php.net/ - it just aggregates a bunch of blogs.


--
Postgresql  php tutorials
http://www.designmagick.com/


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



Re: [PHP] Multiple MySQL INSERT

2008-12-01 Thread Chris

ddg2sailor wrote:

Hi People

My real problem is that I dont know code. I can sort of edit it in a sloppy
more or less works fashion. Any help would be great.

This is the code Im having problems with:


//Example//

$id = 0 + $_GET[id];
$md5 = $_GET[secret];




$gig = 1;
$giveupload = $gig*1024*1024*1024;

$res = mysql_query(SELECT passhash, editsecret, status FROM users WHERE id
= $id);
$row = mysql_fetch_array($res);



$res = mysql_query(SELECT passhash, editsecret, status FROM users WHERE id
= $id);
$row = mysql_fetch_array($res);


I hope this is a copy/paste error or are you running the same thing twice?


mysql_query(UPDATE users SET status='confirmed', uploaded = $giveupload );


This updates *every* user to have a confirmed status. Probably not what 
you want.


Add a

WHERE id='X';

clause



//send pm to new user

{

$msg = sqlesc(Hello and welcome to Cyber Drive In you have been
given a 1gb head start to help your ratio. .we are a strict but fair site
and our warning are based on the torrent ratio not the global just because
you have a good ratio dont mean you can hit and run if you do hit and run
your downloads maybe disabled even if your global ratio is fine..so enjoy
our free 1gb gift rules are seed what you take or for 72 hours..plz read the
rules and facts now you have joined our friendly community);
$added = sqlesc(get_date_time());
$subject = sqlesc(Welcome to Cyber Drive In);
mysql_query(INSERT INTO messages (sender, receiver, subject, msg,
added) VALUES (0, $id, $subject, $msg, $added));


What is the sqlesc function?

You need quotes around your values:

$sql = insert into table(f1, f2, f3) values (' . 
mysql_real_escape_string($value_1) . ', ' . 
mysql_real_escape_string($value_2) . ');


--
Postgresql  php tutorials
http://www.designmagick.com/


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



Re: [PHP] Multiple MySQL INSERT

2008-12-01 Thread ddg2sailor


chris smith-9 wrote:
 
 ddg2sailor wrote:
 $row = mysql_fetch_array($res);
 
 $res = mysql_query(SELECT passhash, editsecret, status FROM users WHERE
 id
 = $id);
 $row = mysql_fetch_array($res);
 
 I hope this is a copy/paste error or are you running the same thing twice?
 
 
 I diddnt see that right away. In fact Im combining 2 pieces of code. The
 owner of this site dosent want to use a mail server and dosent want to do
 a manual confirm. So I added part of the confirm.php to the takesignup.php
 file
 
 mysql_query(UPDATE users SET status='confirmed', uploaded = $giveupload
 );
 
 This updates *every* user to have a confirmed status. Probably not what 
 you want.
 
 Add a
 
 WHERE id='X';
 
 clause
 
 Believe me I agree with you... but this is how he wants it. It took me a
 while to realize that the new user cant call up the confirm.php without
 the mail with the link and the user name and secret word.
 
 //send pm to new user
 
 {
 
 $msg = sqlesc(Hello and welcome to Cyber Drive In you have been
 given a 1gb head start to help your ratio. .we are a strict but fair site
 and our warning are based on the torrent ratio not the global just
 because
 you have a good ratio dont mean you can hit and run if you do hit and run
 your downloads maybe disabled even if your global ratio is fine..so enjoy
 our free 1gb gift rules are seed what you take or for 72 hours..plz read
 the
 rules and facts now you have joined our friendly community);
 $added = sqlesc(get_date_time());
 $subject = sqlesc(Welcome to Cyber Drive In);
 mysql_query(INSERT INTO messages (sender, receiver, subject,
 msg,
 added) VALUES (0, $id, $subject, $msg, $added));
 
 What is the sqlesc function?
 
 This is the way the code is when I got it. I think that this is how it
 reads from the array. I can see where a table might be more use here.
 
 You need quotes around your values:
 
 $sql = insert into table(f1, f2, f3) values (' . 
 mysql_real_escape_string($value_1) . ', ' . 
 mysql_real_escape_string($value_2) . ');
 
 Im guessing that the preceding line got a bit chopped in the sending
 at least it dosent look quite right as it is. If I cut and paste this back
 together I should be able to follow your convention.
 
 Thanks for your Reply... and if you saw the first post in this thread..
 sorry , shouldnt have clicked html and I should have previewed first.
 
 Regards
 Sailor
 -- 
 Postgresql  php tutorials
 http://www.designmagick.com/
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Multiple-MySQL-INSERT-tp20786333p20787487.html
Sent from the PHP - General mailing list archive at Nabble.com.


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



Re: [PHP] Which is the right list?

2008-12-01 Thread Geek (de=German top level domain)
Thanks for the prompt reply! I'll try and answer as many questions here as I
can. Maybe one of you can answer my questions then :)

On Tue, Dec 2, 2008 at 6:26 PM, Chris [EMAIL PROTECTED] wrote:

 Geek (de=German top level domain) wrote:

 Hi everyone,

 Sorry for my stupidity, but I couldn't see which of the lists is the right
 one to know about important news and or features that I might not think or
 be aware about for PHP. I'm a PHP developer, mainly using the Symfony
 framework and would like to know about important developments, new stuff
 and
 interesting suggestions. This seems to be more of a catch all list.


 This list is for I have a problem, can someone help me type questions.

 If you want general announcements (new versions, stuff about security
 issues I guess), join the announcements list (
 http://www.php.net/mailing-lists.php).

 For symfony, look at their site: http://www.symfony-project.org/community

 If you want other general stuff, you can also look at
 http://www.planet-php.net/ - it just aggregates a bunch of blogs.

 --
 Postgresql  php tutorials
 http://www.designmagick.com/




-- 
Tim-Hinnerk Heuer

http://www.ihostnz.com -- Web Design, Hosting and free Linux Support