php-general Digest 6 Feb 2006 02:55:43 -0000 Issue 3947

2006-02-05 Thread php-general-digest-help
php-general Digest 6 Feb 2006 02:55:43 - Issue 3947 Topics (messages 229895 through 229909): Re: Help with mysql_query and INSERT INTO 229895 by: Colin Davis Re: xml to array 229896 by: Brian V Bonini Re: Reverse Engineering of Smarty 229897 by: tedd 229900

Re: [PHP] Reverse Engineering of Smarty

2006-02-05 Thread Max Schwanekamp
Zareef Ahmed wrote: Accidentally I got deleted all of my php code in one of my application, I was using smarty and its compiled directory has the code in its native format. Is there any way so I can do some type of reverse engineering to bring back my original code? No, Smarty's compiled

[PHP] Help with mysql_query and INSERT INTO

2006-02-05 Thread Colin Davis
I need to insert a new record into a MySQL table which has an auto_increment field Ref as the primary index. When I have inserted the new record, I need to get the new Ref value in order to name some files to relate to the record. At the moment I have to do a SELECT command and search for

Re: [PHP] Help with mysql_query and INSERT INTO

2006-02-05 Thread Johan Martin
On Saturday, Feb 4, 2006, at 07:22 America/Los_Angeles, Colin Davis wrote: I need to insert a new record into a MySQL table which has an auto_increment field Ref as the primary index. When I have inserted the new record, I need to get the new Ref value in order to name some files to

Re: [PHP] xml to array

2006-02-05 Thread Tod Thomas
Brian V Bonini wrote: On Fri, 2006-02-03 at 16:23, Richard Lynch wrote: I've got my money on the XML spec REQUIRING an alphabetic start to tagnames, and subsequent characters can be alphanumeric... In other words, it doesn't work because 0 is not a valid XML tag. Yeah, that was my

Re: [PHP] Reverse Engineering of Smarty

2006-02-05 Thread Rory Browne
If you don't have backups, then: 1: Why do you not have backups? 2: Are you insane? 3: What filesystem, and file recovery techniques have you researched/attempted? 4: Why do you not have backups? 5: Are you insane? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Help with mysql_query and INSERT INTO

2006-02-05 Thread Colin Davis
Thank you, that is perfect. Regards Colin Davis http://www.ukpages.org Johan Martin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] http://www.php.net/manual/en/function.mysql-insert-id.php This will give you the record id of the last record inserted (or created). Johan Martin

Re: [PHP] xml to array

2006-02-05 Thread Brian V Bonini
On Sun, 2006-02-05 at 06:32, Tod Thomas wrote: Just a quick shot it the dark... http://www.w3.org/TR/REC-xml/#NT-Name Go up about a half page to this: [Definition: A Name is a token beginning with a letter or one of a few punctuation characters, and continuing with letters, digits,

Re: [PHP] Reverse Engineering of Smarty

2006-02-05 Thread tedd
Hi All, Accidentally I got deleted all of my php code in one of my application, I was using smarty and its compiled directory has the code in its native format. Is there any way so I can do some type of reverse engineering to bring back my original code? Any suggestion? Thanks in

[PHP] Sound

2006-02-05 Thread tedd
Hi gang: Does anyone know a way to generate a sound (bell, click, tone, peep, buzz, word) from php? tedd -- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] need help to update a mysql table from dynamic form

2006-02-05 Thread Patrick Aljord
On 2/4/06, Sumeet [EMAIL PROTECTED] wrote: Patrick Aljord wrote: could someone please help me on that one? http://hashphp.org/pastebin?pid=6156 basically this is how I do: I display a mysql table in an html table and I put each value in an input text box. At the bottom I put a

Re: [PHP] Reverse Engineering of Smarty

2006-02-05 Thread Sumeet
Rory Browne wrote: If you don't have backups, then: 1: Why do you not have backups? 2: Are you insane? hmm. totally uncalled for -- Sumeet Shroff http://www.prateeksha.com Web Design and Ecommerce Development, Mumbai India -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Reverse Engineering of Smarty

2006-02-05 Thread Patrick Aljord
There is unfortunately no way to reverse your code back, the only thing you can do is google for file recovery techniques or just recode the whole thing. If you don't have time for that, maybe something like http://www.joomla.org/ could save your day. Hope that helps Pat On 2/5/06, Zareef Ahmed

Re: [PHP] Re: Using API in other languages

2006-02-05 Thread Rory Browne
My point when I suggested that your best hope was something like webservices was your best hope, was that there is no glue code(that I know of) system. Having that said, it just occured to me that phlanger and roadsend provide this functionality. I forgot about these originally because they're

Re: [PHP] Reverse Engineering of Smarty

2006-02-05 Thread Zareef Ahmed
Original Message - From: Rory Browne [EMAIL PROTECTED] To: Zareef Ahmed [EMAIL PROTECTED] Cc: php-general@lists.php.net Sent: Sunday, February 05, 2006 8:39 AM Subject: Re: [PHP] Reverse Engineering of Smarty If you don't have backups, then: 1: Why do you not have backups? 2: Are

Re: [PHP] Reverse Engineering of Smarty

2006-02-05 Thread Robert Cummings
On Sun, 2006-02-05 at 01:12, Sumeet wrote: Rory Browne wrote: If you don't have backups, then: 1: Why do you not have backups? 2: Are you insane? hmm. totally uncalled for I don't know that it's uncalled for. I think Rory was drawing to attention that not having some kind

[PHP] Resource use reading from file system

2006-02-05 Thread Brian Dunning
I built a quick dirty photo gallery that reads the file system to display filenames of all the images in each folder. As traffic increases, will it save system resources if I have a cron job write include files with the contents of each folder? Is the processor taxed much more to read ~10

Re: [PHP] Resource use reading from file system

2006-02-05 Thread Robert Cummings
On Sun, 2006-02-05 at 14:49, Brian Dunning wrote: I built a quick dirty photo gallery that reads the file system to display filenames of all the images in each folder. As traffic increases, will it save system resources if I have a cron job write include files with the contents of each

Re: [PHP] Reverse Engineering of Smarty

2006-02-05 Thread Zareef Ahmed
Hi All, A lot of talk on that topic. Actually project was very small, Accidentally deleted that, was going to restore it from backup on other filesystem, then just thought that there must be something that can restore from compiled code. So ask the question in this prestigious group,

Re: [PHP] Reverse Engineering of Smarty

2006-02-05 Thread Rory Browne
On 2/5/06, Sumeet [EMAIL PROTECTED] wrote: Rory Browne wrote: If you don't have backups, then: 1: Why do you not have backups? 2: Are you insane? hmm. totally uncalled for Are you insane? isn't considered rude where I'm from or anywhere I've been? If I'd wanted to be

[PHP] problem with Mail function

2006-02-05 Thread Tariq Dalvi
Hello everyone, I m using php mail function it dose everyting fine besides it prints message twise in the email body can someone please have a look what i m doing wrong the code is as follows : $to = $email; $subject = someting goes here \n\n; $headers = From: [EMAIL PROTECTED] . X-Mailer:

[PHP] how to show 6 randomly selected featured products?

2006-02-05 Thread afan
Hi, I have to show 6 of up to 1000 (most likely 200-600) featured products on my online store. My first thought was using this query: $query = mysql_query( SELECT p.prod_id, p.prod_name, p.prod_no, pr.price_id, pr.method, pr.qty, pr.price, pr.sale_price, chp.cat_id FROM products as p

Re: [PHP] problem with Mail function

2006-02-05 Thread sub
This may be a bit to obvious, but I miss little stuff all the time. You wouldn't happen to have the if(mail(...)) in some form of loop would you? or perhaps $to is getting assigned the e-mail address like [EMAIL PROTECTED] [EMAIL PROTECTED] can you check the value of $email before you assign it?

Re: [PHP] how to show 6 randomly selected featured products?

2006-02-05 Thread Chris
Hi, Sounds like your query isn't indexed properly. Check you have an index on: products.prod_id (primary key - should be indexed already) prices.prod_id categories_has_products.prod_id [EMAIL PROTECTED] wrote: Hi, I have to show 6 of up to 1000 (most likely 200-600) featured products on my

Re: [PHP] problem with Mail function

2006-02-05 Thread sunaram patir
Dude, Do not use $to = $email; instead $to=$email; But i didn't even know what is your problem! On 2/6/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: This may be a bit to obvious, but I miss little stuff all the time. You wouldn't happen to have the if(mail(...)) in some form of loop

Re: [PHP] how to show 6 randomly selected featured products?

2006-02-05 Thread Sumeet
[EMAIL PROTECTED] wrote: Hi, I have to show 6 of up to 1000 (most likely 200-600) featured products on my online store. My first thought was using this query: $query = mysql_query( SELECT p.prod_id, p.prod_name, p.prod_no, pr.price_id, pr.method, pr.qty, pr.price, pr.sale_price, chp.cat_id

[PHP] can't output sql query with php code.

2006-02-05 Thread Paul Goepfert
Hi all, I have a mysql database setup to use with my php web page. I have been able to access the database and get values into my drop down menus. However when I tried to output the contents into two two diferent variables the code does not work. To be more specific I will show you the code

[PHP] Submitting form without JavaScript

2006-02-05 Thread Peter Lauri
Best mailing list member, I have an external payment gateway provider (similar to PayPal) and need to send POST variables to them to initiate the Payment Process. Is there any function in PHP that can send POST variables to a URL without using form and then a javascript that submits it when the

Re: [PHP] Submitting form without JavaScript

2006-02-05 Thread Chris
Hi Peter, Curl can do it. http://www.php.net/curl Peter Lauri wrote: Best mailing list member, I have an external payment gateway provider (similar to PayPal) and need to send POST variables to them to initiate the Payment Process. Is there any function in PHP that can send POST variables

Re: [PHP] can't output sql query with php code.

2006-02-05 Thread Chris
Hi Paul, If equip contains a space it will probably break the dropdown. Change it to: echo option value=' . htmlspecialchars($val) . '$val/option\n; in case it has quotes, spaces, or in it. Paul Goepfert wrote: Hi all, I have a mysql database setup to use with my php web page. I have

RE: [PHP] can't output sql query with php code.

2006-02-05 Thread Brady Mitchell
Doesn't work - ?php $month_query = mysql_query(SELECT m_id, months FROM Month); while ($row = mysql_fetch_array($month_query)) { $val = $row[m_id]; $out = $row[months]; echo option value=$val$out/option; } ? You're missing

Re: [PHP] Serious bug ?

2006-02-05 Thread Marco Kaiser
Hi, i tested it with php 5.1.3-dev snap and it works correctly for me. btw. $return = $notdefined_variable; is a bad style for coding and this happens in your situation in a undefined behavior. If you think this is a bug please go to http://bugs.php.net and report them there. 2006/2/4, Bogdan

[PHP] Strip comments but leave URI's which are in between ( and )

2006-02-05 Thread Mathijs
Hello there, I Have the following PREG. I Want to remove comments from an file (Javascript or CSS), but i want to leave the URI's that are within an function. So i thought to exclude any match which is between an ( and ). But i can't seem to figure out exactly how. I have the following atm:

Re: [PHP] can't output sql query with php code.

2006-02-05 Thread Paul Goepfert
This is the full code for the code that doesn't work. ?php echo 'select name=month \n'; $month_query = mysql_query(SELECT m_id, months FROM Month); while ($r = mysql_fetch_array($month_query)); { $v = $r[m_id]; $out = $r[months];

RE: [PHP] Submitting form without JavaScript

2006-02-05 Thread Peter Lauri
But if I do not have LIBCURL? -Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: Monday, February 06, 2006 2:13 PM To: Peter Lauri Cc: php-general@lists.php.net Subject: Re: [PHP] Submitting form without JavaScript Hi Peter, Curl can do it. http://www.php.net/curl Peter

Re: [PHP] Submitting form without JavaScript

2006-02-05 Thread Sumeet
Peter Lauri wrote: Best mailing list member, I have an external payment gateway provider (similar to PayPal) and need to send POST variables to them to initiate the Payment Process. Is there any function in PHP that can send POST variables to a URL without using form and then a

RE: [PHP] Submitting form without JavaScript

2006-02-05 Thread Peter Lauri
Yes this is a solution, but I want to keep the data sent to PayPal out of the HTML code. If you would use that solution someone can get the username from just checking the source from the page. /Peter -Original Message- From: Sumeet [mailto:[EMAIL PROTECTED] Sent: Monday, February 06,