Re: [PHP] Oracle's dump to MySQL

2009-04-03 Thread 9el
On Fri, Apr 3, 2009 at 3:47 AM, Chris  wrote:

> 9el wrote:
>
>> I found this command from one guy for importing Oracle's dump to MySQL
>>
>> Shell> mysql -uroot db_name -vvf < oracle_dump.dmp
>>
>> But, v is for verbose and f is for force continuation.
>>
>> Anyone worked with Oracle and MySQL?
>>
>
> Yep, and there's no way that will ever work except for the very simplest
>  table and data.
>
> The datatypes are different (mysql doesn't have varchar2, timestamp formats
> are different though oracle lets you change that).
>
> You'll need to do a schema-only dump, convert it to the mysql format, then
> worry about converting the data.


Yes, before writing the mail I had this confusion but as my
max_packet_allowed was default to 16M I couldn't have been able to continue
with 28M dump from Oracle.
Now that I have the schema in MySQL already. What can I do to get data only
from Oracle's DB?
There are lots of software tools out there but I want to learn it from the
base. I cant afford to buy any software either.


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


Re: [PHP] [php] scheduled task in php

2009-04-03 Thread Jan G.B.
2009/4/3 Chris :
> Andrew Williams wrote:
>>
>> I want to created a window schedule a task that will run every 2 minutes
>> and
>> run my php script(www.domain.com/script.php).  But I need to know how to
>> create a php.exe that I can select as a window schedule a task so that the
>> php.exe file can execute www.domain.com/script.php at a time interval.
>> Solution please
>
> You don't create a php.exe file, one should already be there from when you
> installed php.
>

And if you still don't see your executable, then it would be time to
give http://php.net/downloads/ a try! ;-)


> --
> 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Button id's - firefox and IE different ?

2009-04-03 Thread Jan G.B.
Igor,
what are you doing here? You say I'm arguing to show how big I am, but
that's not true. I corrected your misleading tipps like using JSCRIPT
to have form essentials and using xhtml in an html context.
no reason to get personal and/or offending.

bye.


2009/4/2 Igor Escobar :
> I'm sorry, you is the master o/

> shame on you.

> Who you think you is? everybody is here to pass something for the
> others and learn something, everything i wrote its just  to help, if you are
> compete with others showing how much bigger you is, go to a championship or
> something.
>
> Have a nice day.
>
> Regards,
> Igor Escoar
> Systems Analyst & Interface Designer
>
> --
>
> Personal Blog
> ~ blog.igorescobar.com
> Online Portifolio
> ~ www.igorescobar.com
> Twitter
> ~ @igorescobar
>
>
>
>
>
> On Thu, Apr 2, 2009 at 11:01 AM, Jan G.B.  wrote:
>>
>> 2009/4/2 Igor Escobar :
>> > If you don't want change your form, do some function in Javascript witch
>> > control the last button you clicked.
>> >
>>
>> Javascript is bad and you don't need it.
>>
>> >> Delete
>> >> Delete
>> >> Delete
>> >
>> > 
>> >
>> > I wanna make a advice to you learn more about HTML and Web Standards...
>>
>> I want give an advice to you: learn to make a difference out of HTML
>> and XHTML. It's not the same, and  is XHTML.
>>
>> > Don't use button type... use "input" type...
>> >
>>
>> You forgot to mention *why* he should he use !
>>
>>  is supported by all major browsers! So there's no need to use
>>  instead ...
>>
>> But having several  or  tags in one form element with
>> the same NAME="" value makes no sense! Only the last one in the code
>> will be submitted.
>> Also, the LABEL for the button should be written like that: > name="x1" value="0815">LABEL GOES HERE
>>
>> http://www.w3schools.com/tags/tag_button.asp
>>
>>
>> Using  might be more future-oriented.. ;)
>>
>>
>>
>> > Your javascript (using jQuery) sems like this
>> >
>>
>> Installing and using "jquery" to have three buttons is overkill. not
>> more, not less!
>>
>>
>> byebye
>>
>> > $("input[name='btid']").click(function() {
>> > $('#last_buttom').attr('value', $(this).val());
>> > });
>> >
>> > And then you submit your form or something, the input "last_buttom" are
>> > with
>> > the value of the buttom you has clicked at last time.
>> >
>> > Regards,
>> > Igor Escobar
>> > systems analyst & interface designer
>> > www . igorescobar . com
>> >
>> >
>> >
>> > On Thu, Apr 2, 2009 at 8:29 AM, Phpster  wrote:
>> >
>> >> What about styling a link to look like a button with css? It won't be
>> >> an
>> >> exact match style wise but you can get close. I have done this
>> >> succesfully
>> >>
>> >> Bastien
>> >>
>> >> Sent from my iPod
>> >>
>> >>
>> >> On Apr 2, 2009, at 6:04, "Angus Mann"  wrote:
>> >>
>> >>  Hi all.
>> >>>
>> >>> I want to have several delete buttons with just one form, and
>> >>> depending on
>> >>> which button is pressed, one of several items is deleted.
>> >>>
>> >>> So I need multiple submit buttons for 1 form, each displaying the same
>> >>> text "Delete" to the user, but each with a different "value" so the
>> >>> PHP
>> >>> script can tell them apart.
>> >>>
>> >>> I've used this code for the buttons...
>> >>> Delete
>> >>> Delete
>> >>> Delete
>> >>>
>> >>> And it works just fine with firefox. But IE does not seem to pass the
>> >>> value back to the btid so when the script asks
>> >>> if $_POST['btid'] == "1" {
>> >>> }
>> >>>
>> >>> the value 1, 2, or 3 is not given back to PHP by IE. It is given back
>> >>> correctly by firefox and works fine.
>> >>>
>> >>> Any suggestions ?
>> >>>
>> >>> Thanks.
>> >>>
>> >>>
>> >> --
>> >> 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] syntax woes

2009-04-03 Thread Michael A. Peters

Jan G.B. wrote:


you don't need the "ugly" . " " . "string" . "merging".


um, I guess most of my code is ugly ;)

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



Re: [PHP] syntax woes

2009-04-03 Thread Jan G.B.
2009/4/3  :
> Hi all,
>
> For any one following this thread, here is how I worked around the
> apache/php/chown limitation.
>
> script snippet (and if any one has a more elegant style, please share as I
> am an amateur script kiddie).
>
> $path = "/homes".$username;
> $chowncmd = "/usr/bin/sudo /bin/chown ";
> mkdir($path);
> chmod($path, 0775);
> exec($chowncmd.$username. " ".$path);
>
>


OK - you asked for style... ;)
I personally think it's elegant to build such strings with sprintf() like..

$path = sprintf("/homes/%s", $username);
or exec(sprintf("%s %s %s", $chowncmd, $username, $path));

That way you don't need added whitespace on vars like $chowncmd and
you don't need the "ugly" . " " . "string" . "merging".

btw. be sure that you always use
http://php.net/manual/en/function.escapeshellcmd.php as well as
http://php.net/manual/en/function.escapeshellarg.php when dealing with
user inputs and system calls.

byebye




> I modified /etc/sudoers;
>
> #Defaults requiretty   - I added the comment.
> apache ALL = NOPASSWD: /bin/chown  - added this line.
>
> - aurf
> On Apr 2, 2009, at 6:58 PM, Michael A. Peters wrote:
>
>> Chris wrote:
>>>
>>> Shawn McKenzie wrote:

 Chris wrote:
>>
>> Wow, it does chown and chmod as well, thats friggen cool.
>
> chown will only work if the script is running as root which I doubt
> your
> drupal site will be.
>

 Or if the script is running as a user/group that has write permissions
 to the dir/file that your trying to chown.
>>>
>>> chmod may allow that, but not chown.
>>
>> I believe it depends upon the operating system and version of the
>> operating system.
>>
>> --
>> 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Java applet clearing session variables?

2009-04-03 Thread Peter Ford
Dan King wrote:
> It seems that our java applet is clearing our php session variables.
> 
> I have an html form that saves user information as session variables. These 
> session variables are used to create folders, where uploaded files can be 
> saved. I've tested my php script that uses the session variables to create a 
> folder and then moves uploaded files to that folder with a traditional html 
> upload form. 
> However, when I use a java applet in place of the traditional html form the 
> php script does not create the folder, and thus it obviously cannot move the 
> uploaded files. 
> 
> I've tested the applet and it does successfully upload files to the server. 
> When I printed the session array variable after using the applet, I noticed 
> the session array was empty. Does anyone know why this the applet clears the 
> session variables? Or how to stop/work around it so I can use the applet and 
> the php script?
> 
> Thanks,
> 
> Dan
> 
> 
> 
>   

The most likely thing is that the java applet isn't using the same session as
the HTML. I suspect that the applet does not have access to, or does not attempt
to access, the cookie that carries the session ID.
You may have to prime the applet with the session ID somehow before it runs so
that it can generate a PHP_SESSIONID (or whatever it is) cookie to send back to
PHP...

-- 
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] Oracle's dump to MySQL

2009-04-03 Thread Phpster

Extract to csv/XML?

Bastien

Sent from my iPod

On Apr 3, 2009, at 5:10, 9el  wrote:


On Fri, Apr 3, 2009 at 3:47 AM, Chris  wrote:


9el wrote:

I found this command from one guy for importing Oracle's dump to  
MySQL


Shell> mysql -uroot db_name -vvf < oracle_dump.dmp

But, v is for verbose and f is for force continuation.

Anyone worked with Oracle and MySQL?



Yep, and there's no way that will ever work except for the very  
simplest

table and data.

The datatypes are different (mysql doesn't have varchar2, timestamp  
formats

are different though oracle lets you change that).

You'll need to do a schema-only dump, convert it to the mysql  
format, then

worry about converting the data.



Yes, before writing the mail I had this confusion but as my
max_packet_allowed was default to 16M I couldn't have been able to  
continue

with 28M dump from Oracle.
Now that I have the schema in MySQL already. What can I do to get  
data only

from Oracle's DB?
There are lots of software tools out there but I want to learn it  
from the

base. I cant afford to buy any software 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



Re: [PHP] [php] scheduled task in php

2009-04-03 Thread Andrew Williams
does anyone knows the the following is not working:

C:\PHP\php.exe  D:\DEMO\index.php?action=run&run=1

On Thu, Apr 2, 2009 at 2:06 PM, Virgilio Quilario <
virgilio.quila...@gmail.com> wrote:

> > Please how can you run a timed php script file via window scheduled task.
> or
> > how can u execute a php script on a a time interval for instance every
> > 4minutes
>
> hi Andrew,
>
> first schedule a task, locate and select your php.exe, and schedule it
> to run daily for the moment.
> after creating it, you will see it listed on the window.
> right click on it, and select properties.
> on your Run box, add your script next to php.exe. ie
> c:\path\to\php.exe myscript.php
> click on schedule, click on advanced button, check on repeat task, put
> 4 on every box, and finally click on ok, then apply button.
>
> that's it.
>
> cheers,
> virgil
> http://www.jampmark.com
>



-- 
Best Wishes
Andrew Williams


Re: [PHP] [php] scheduled task in php

2009-04-03 Thread j's php general
On Fri, Apr 3, 2009 at 7:49 PM, Andrew Williams
 wrote:
> does anyone knows the the following is not working:
>
> C:\PHP\php.exe  D:\DEMO\index.php?action=run&run=1
>

The querystring does not have an effect from the command line, it is
part of the HTTP protocol. Use console options instead and use the
getopt function http://us2.php.net/manual/en/function.getopt.php

-- 
http://www.lampadmins.com

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



[PHP]scheduled task in php IN FIREFOX

2009-04-03 Thread Andrew Williams
HOW DO YOU CONFIGURE scheduled task to use firefox instead of Internet
Explorer


Re: [PHP]scheduled task in php IN FIREFOX

2009-04-03 Thread Michael A. Peters

Andrew Williams wrote:

HOW DO YOU CONFIGURE scheduled task to use firefox instead of Internet
Explorer



Install Linux ;)

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



Re: [PHP]scheduled task in php IN FIREFOX

2009-04-03 Thread Bastien Koert
On Fri, Apr 3, 2009 at 9:02 AM, Michael A. Peters  wrote:

> Andrew Williams wrote:
>
>> HOW DO YOU CONFIGURE scheduled task to use firefox instead of Internet
>> Explorer
>>
>>
> Install Linux ;)
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
instead of loading the php.exe, load FF and point to the script, note that
this will open a browser window and you will need to close that in order to
keep the resources on the server from being exhausted due to many windows
being opened.

-- 

Bastien

Cat, the other other white meat


Re: [PHP]scheduled task in php IN FIREFOX

2009-04-03 Thread Stuart
2009/4/3 Andrew Williams :
> HOW DO YOU CONFIGURE scheduled task to use firefox instead of Internet
> Explorer

Why is a scheduled task using a browser at all? What is the task doing?

-Stuart

-- 
http://stut.net/

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



Re: [PHP]scheduled task in php IN FIREFOX

2009-04-03 Thread Stuart
Please include the list when replying.

2009/4/3 Andrew Williams :
> interval update

I'm sorry, and that means what exactly?

Assuming you just need to hit a certain URL periodically you just need
to use curl or similar. There's no need to get a browser involved.

-Stuart

> On Fri, Apr 3, 2009 at 2:05 PM, Stuart  wrote:
>>
>> 2009/4/3 Andrew Williams :
>> > HOW DO YOU CONFIGURE scheduled task to use firefox instead of Internet
>> > Explorer
>>
>> Why is a scheduled task using a browser at all? What is the task doing?
>>
>> -Stuart
>>
>> --
>> http://stut.net/
>
>
>
> --
> Best Wishes
> Andrew Williams
>
>
>

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



Re: [PHP]scheduled task in php IN FIREFOX

2009-04-03 Thread Andrew Williams
That is a better idea but the program needs about five minutes to complete.
Would that not be a problem?

On Fri, Apr 3, 2009 at 2:44 PM, Stuart  wrote:

> Please include the list when replying.
>
> 2009/4/3 Andrew Williams :
> > interval update
>
> I'm sorry, and that means what exactly?
>
> Assuming you just need to hit a certain URL periodically you just need
> to use curl or similar. There's no need to get a browser involved.
>
> -Stuart
>
> > On Fri, Apr 3, 2009 at 2:05 PM, Stuart  wrote:
> >>
> >> 2009/4/3 Andrew Williams :
> >> > HOW DO YOU CONFIGURE scheduled task to use firefox instead of Internet
> >> > Explorer
> >>
> >> Why is a scheduled task using a browser at all? What is the task doing?
> >>
> >> -Stuart
> >>
> >> --
> >> http://stut.net/
> >
> >
> >
> > --
> > Best Wishes
> > Andrew Williams
> >
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Best Wishes
Andrew Williams


Re: [PHP] Button id's - firefox and IE different ?

2009-04-03 Thread Igor Escobar
If you read my email you can see that i just give a "solution" to him and
not a TIP.

"IF you DONT want change your form"

But if i were doing, i be doing by the right way...can be sure that.


Regards,
Igor Escoar
Systems Analyst & Interface Designer

--

Personal Blog
~ blog.igorescobar.com
Online Portifolio
~ www.igorescobar.com
Twitter
~ @igorescobar





On Fri, Apr 3, 2009 at 6:27 AM, Jan G.B.  wrote:

> Igor,
> what are you doing here? You say I'm arguing to show how big I am, but
> that's not true. I corrected your misleading tipps like using JSCRIPT
> to have form essentials and using xhtml in an html context.
> no reason to get personal and/or offending.
>
> bye.
>
>
> 2009/4/2 Igor Escobar :
> > I'm sorry, you is the master o/
>
> > shame on you.
>
> > Who you think you is? everybody is here to pass something for the
> > others and learn something, everything i wrote its just  to help, if you
> are
> > compete with others showing how much bigger you is, go to a championship
> or
> > something.
> >
> > Have a nice day.
> >
> > Regards,
> > Igor Escoar
> > Systems Analyst & Interface Designer
> >
> > --
> >
> > Personal Blog
> > ~ blog.igorescobar.com
> > Online Portifolio
> > ~ www.igorescobar.com
> > Twitter
> > ~ @igorescobar
> >
> >
> >
> >
> >
> > On Thu, Apr 2, 2009 at 11:01 AM, Jan G.B. 
> wrote:
> >>
> >> 2009/4/2 Igor Escobar :
> >> > If you don't want change your form, do some function in Javascript
> witch
> >> > control the last button you clicked.
> >> >
> >>
> >> Javascript is bad and you don't need it.
> >>
> >> >> Delete
> >> >> Delete
> >> >> Delete
> >> >
> >> > 
> >> >
> >> > I wanna make a advice to you learn more about HTML and Web
> Standards...
> >>
> >> I want give an advice to you: learn to make a difference out of HTML
> >> and XHTML. It's not the same, and  is XHTML.
> >>
> >> > Don't use button type... use "input" type...
> >> >
> >>
> >> You forgot to mention *why* he should he use !
> >>
> >>  is supported by all major browsers! So there's no need to use
> >>  instead ...
> >>
> >> But having several  or  tags in one form element with
> >> the same NAME="" value makes no sense! Only the last one in the code
> >> will be submitted.
> >> Also, the LABEL for the button should be written like that:  >> name="x1" value="0815">LABEL GOES HERE
> >>
> >> http://www.w3schools.com/tags/tag_button.asp
> >>
> >>
> >> Using  might be more future-oriented.. ;)
> >>
> >>
> >>
> >> > Your javascript (using jQuery) sems like this
> >> >
> >>
> >> Installing and using "jquery" to have three buttons is overkill. not
> >> more, not less!
> >>
> >>
> >> byebye
> >>
> >> > $("input[name='btid']").click(function() {
> >> > $('#last_buttom').attr('value', $(this).val());
> >> > });
> >> >
> >> > And then you submit your form or something, the input "last_buttom"
> are
> >> > with
> >> > the value of the buttom you has clicked at last time.
> >> >
> >> > Regards,
> >> > Igor Escobar
> >> > systems analyst & interface designer
> >> > www . igorescobar . com
> >> >
> >> >
> >> >
> >> > On Thu, Apr 2, 2009 at 8:29 AM, Phpster  wrote:
> >> >
> >> >> What about styling a link to look like a button with css? It won't be
> >> >> an
> >> >> exact match style wise but you can get close. I have done this
> >> >> succesfully
> >> >>
> >> >> Bastien
> >> >>
> >> >> Sent from my iPod
> >> >>
> >> >>
> >> >> On Apr 2, 2009, at 6:04, "Angus Mann"  wrote:
> >> >>
> >> >>  Hi all.
> >> >>>
> >> >>> I want to have several delete buttons with just one form, and
> >> >>> depending on
> >> >>> which button is pressed, one of several items is deleted.
> >> >>>
> >> >>> So I need multiple submit buttons for 1 form, each displaying the
> same
> >> >>> text "Delete" to the user, but each with a different "value" so the
> >> >>> PHP
> >> >>> script can tell them apart.
> >> >>>
> >> >>> I've used this code for the buttons...
> >> >>> Delete
> >> >>> Delete
> >> >>> Delete
> >> >>>
> >> >>> And it works just fine with firefox. But IE does not seem to pass
> the
> >> >>> value back to the btid so when the script asks
> >> >>> if $_POST['btid'] == "1" {
> >> >>> }
> >> >>>
> >> >>> the value 1, 2, or 3 is not given back to PHP by IE. It is given
> back
> >> >>> correctly by firefox and works fine.
> >> >>>
> >> >>> Any suggestions ?
> >> >>>
> >> >>> Thanks.
> >> >>>
> >> >>>
> >> >> --
> >> >> PHP General Mailing List (http://www.php.net/)
> >> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >> >>
> >> >>
> >> >
> >
> >
>


Re: [PHP] PHP LDAP over SSL problems

2009-04-03 Thread Keith Lawson


>>> On Thu, Apr 2, 2009 at  5:51 PM, in message <49d53344.7040...@gmail.com>, 
>>> Chris
 wrote: 
> Keith Lawson wrote:
>> Hello, 
>> 
>> I have been working on this problem for some time now and I can't seem to 
> resolve it. Everything I have found on google and php.net says I can connect 
> to an LDAP server with SSL by setting "TLS_REQCERT never" in ldap.conf. I 
> want to eliminate certs from the picture for now just to confirm I can make 
> the connection which is why I have "TLS_REQCERT never" set. 
>> 
>> I added that setting to my ldap.conf and my test code now works from the 
> command line but it does not work when I call it from a browser. Here is my 
> test: 
>> 
>> > $ldaphost = "ldaps://my.ldap.server";
>> 
>> //ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, 7);
>> // Connecting to LDAP
>> $ldapconn = ldap_connect($ldaphost)
>>   or die("Could not connect to {$ldaphost}");
>> ldap_set_option($ldapconn, LDAP_OPT_PROTOCOL_VERSION, 3);
>> ldap_set_option($ldapconn, LDAP_OPT_REFERRALS, 0);
>> 
>> echo var_dump(@ldap_bind($ldapconn, "cn=Keithl, ou=Users, o=LH"));
> 
> It's hard to know -  you're suppressing errors.
> 
> Add these 2 lines to your script:
> error_reporting(E_ALL);
> ini_set('display_errors', true);

I've done that and I get the following when I load the page in a browser: 
Warning: ldap_bind() [function.ldap-bind]: Unable to bind to server: Can't 
contact LDAP server in /www/doc/INTRA/ktlwiki/ldap-test.php on line 19
bool(false)
Can't contact LDAP server

>From the command line still works: 

[www]/www/doc/> php ldap-test.php
bool(true)
Success

As I mentioned the command line call did not work until I added "TLS_REQCERT 
never" to ldap.conf. I need to figure out why the apache loadable module is 
behaving differently than the command line binary. I'm pretty sure the web page 
is failing because it is still trying to verify the LDAP server's cert. 


> 
> Then get rid of the @ in front of ldap_bind.
> 
> Use http://www.php.net/manual/en/function.ldap- error.php to capture the 
> error message and search for it.


 


The information transmitted is intended only for the person or entity to which 
it is addressed and may contain confidential and/or privileged material. Any 
review, retransmission, dissemination or other use of, or taking of any action 
in  reliance upon, this information by persons or entities other  than the 
intended recipient is prohibited. If you received this  in error, please 
contact the sender and delete the material from any computer. 


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



Re: [PHP] syntax woes

2009-04-03 Thread Shawn McKenzie
Chris wrote:
> Shawn McKenzie wrote:
>> Chris wrote:
 Wow, it does chown and chmod as well, thats friggen cool.
>>> chown will only work if the script is running as root which I doubt your
>>> drupal site will be.
>>>
>>
>> Or if the script is running as a user/group that has write permissions
>> to the dir/file that your trying to chown.
> 
> chmod may allow that, but not chown.
> 
> server:~# groupadd test
> server:~# useradd a -g test
> server:~# useradd b -g test
> server:~# mkdir /test
> server:~# chown a.test /test
> server:~# su - a
> No directory, logging in with HOME=/
> a...@server:/$ cd test
> a...@server:/test$ chmod 775 .
> a...@server:/test$ touch a
> a...@server:/test$ chmod 664 a
> a...@server:/test$ chown b.test a
> chown: changing ownership of `a': Operation not permitted
> a...@server:/test$
> 
> 
Yeah, my bad.  chmod it is...

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

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



Re: [PHP] Button id's - firefox and IE different ?

2009-04-03 Thread Jan G.B.
http://www.stimpco.com/carpix/arguingOnTheInternet.gif

byebye

2009/4/3 Igor Escobar :
> If you read my email you can see that i just give a "solution" to him and
> not a TIP.
>
> "IF you DONT want change your form"
>
> But if i were doing, i be doing by the right way...can be sure that.
>
>
> Regards,
> Igor Escoar
> Systems Analyst & Interface Designer
>
> --
>
> Personal Blog
> ~ blog.igorescobar.com
> Online Portifolio
> ~ www.igorescobar.com
> Twitter
> ~ @igorescobar
>
>
>
>
>
> On Fri, Apr 3, 2009 at 6:27 AM, Jan G.B.  wrote:
>>
>> Igor,
>> what are you doing here? You say I'm arguing to show how big I am, but
>> that's not true. I corrected your misleading tipps like using JSCRIPT
>> to have form essentials and using xhtml in an html context.
>> no reason to get personal and/or offending.
>>
>> bye.
>>
>>
>> 2009/4/2 Igor Escobar :
>> > I'm sorry, you is the master o/
>>
>> > shame on you.
>>
>> > Who you think you is? everybody is here to pass something for the
>> > others and learn something, everything i wrote its just  to help, if you
>> > are
>> > compete with others showing how much bigger you is, go to a championship
>> > or
>> > something.
>> >
>> > Have a nice day.
>> >
>> > Regards,
>> > Igor Escoar
>> > Systems Analyst & Interface Designer
>> >
>> > --
>> >
>> > Personal Blog
>> > ~ blog.igorescobar.com
>> > Online Portifolio
>> > ~ www.igorescobar.com
>> > Twitter
>> > ~ @igorescobar
>> >
>> >
>> >
>> >
>> >
>> > On Thu, Apr 2, 2009 at 11:01 AM, Jan G.B. 
>> > wrote:
>> >>
>> >> 2009/4/2 Igor Escobar :
>> >> > If you don't want change your form, do some function in Javascript
>> >> > witch
>> >> > control the last button you clicked.
>> >> >
>> >>
>> >> Javascript is bad and you don't need it.
>> >>
>> >> >> Delete
>> >> >> Delete
>> >> >> Delete
>> >> >
>> >> > 
>> >> >
>> >> > I wanna make a advice to you learn more about HTML and Web
>> >> > Standards...
>> >>
>> >> I want give an advice to you: learn to make a difference out of HTML
>> >> and XHTML. It's not the same, and  is XHTML.
>> >>
>> >> > Don't use button type... use "input" type...
>> >> >
>> >>
>> >> You forgot to mention *why* he should he use !
>> >>
>> >>  is supported by all major browsers! So there's no need to use
>> >>  instead ...
>> >>
>> >> But having several  or  tags in one form element with
>> >> the same NAME="" value makes no sense! Only the last one in the code
>> >> will be submitted.
>> >> Also, the LABEL for the button should be written like that: > >> name="x1" value="0815">LABEL GOES HERE
>> >>
>> >> http://www.w3schools.com/tags/tag_button.asp
>> >>
>> >>
>> >> Using  might be more future-oriented.. ;)
>> >>
>> >>
>> >>
>> >> > Your javascript (using jQuery) sems like this
>> >> >
>> >>
>> >> Installing and using "jquery" to have three buttons is overkill. not
>> >> more, not less!
>> >>
>> >>
>> >> byebye
>> >>
>> >> > $("input[name='btid']").click(function() {
>> >> > $('#last_buttom').attr('value', $(this).val());
>> >> > });
>> >> >
>> >> > And then you submit your form or something, the input "last_buttom"
>> >> > are
>> >> > with
>> >> > the value of the buttom you has clicked at last time.
>> >> >
>> >> > Regards,
>> >> > Igor Escobar
>> >> > systems analyst & interface designer
>> >> > www . igorescobar . com
>> >> >
>> >> >
>> >> >
>> >> > On Thu, Apr 2, 2009 at 8:29 AM, Phpster  wrote:
>> >> >
>> >> >> What about styling a link to look like a button with css? It won't
>> >> >> be
>> >> >> an
>> >> >> exact match style wise but you can get close. I have done this
>> >> >> succesfully
>> >> >>
>> >> >> Bastien
>> >> >>
>> >> >> Sent from my iPod
>> >> >>
>> >> >>
>> >> >> On Apr 2, 2009, at 6:04, "Angus Mann"  wrote:
>> >> >>
>> >> >>  Hi all.
>> >> >>>
>> >> >>> I want to have several delete buttons with just one form, and
>> >> >>> depending on
>> >> >>> which button is pressed, one of several items is deleted.
>> >> >>>
>> >> >>> So I need multiple submit buttons for 1 form, each displaying the
>> >> >>> same
>> >> >>> text "Delete" to the user, but each with a different "value" so the
>> >> >>> PHP
>> >> >>> script can tell them apart.
>> >> >>>
>> >> >>> I've used this code for the buttons...
>> >> >>> Delete
>> >> >>> Delete
>> >> >>> Delete
>> >> >>>
>> >> >>> And it works just fine with firefox. But IE does not seem to pass
>> >> >>> the
>> >> >>> value back to the btid so when the script asks
>> >> >>> if $_POST['btid'] == "1" {
>> >> >>> }
>> >> >>>
>> >> >>> the value 1, 2, or 3 is not given back to PHP by IE. It is given
>> >> >>> back
>> >> >>> correctly by firefox and works fine.
>> >> >>>
>> >> >>> Any suggestions ?
>> >> >>>
>> >> >>> Thanks.
>> >> >>>
>> >> >>>
>> >> >> --
>> >> >> 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] Button id's - firefox and IE different ?

2009-04-03 Thread Igor Escobar
Better then READ is UNDERSTAND.

Regards,
Igor Escoar
Systems Analyst & Interface Designer

--

Personal Blog
~ blog.igorescobar.com
Online Portifolio
~ www.igorescobar.com
Twitter
~ @igorescobar





On Fri, Apr 3, 2009 at 11:30 AM, Jan G.B.  wrote:

> http://www.stimpco.com/carpix/arguingOnTheInternet.gif
>
> byebye
>
> 2009/4/3 Igor Escobar :
> > If you read my email you can see that i just give a "solution" to him and
> > not a TIP.
> >
> > "IF you DONT want change your form"
> >
> > But if i were doing, i be doing by the right way...can be sure that.
> >
> >
> > Regards,
> > Igor Escoar
> > Systems Analyst & Interface Designer
> >
> > --
> >
> > Personal Blog
> > ~ blog.igorescobar.com
> > Online Portifolio
> > ~ www.igorescobar.com
> > Twitter
> > ~ @igorescobar
> >
> >
> >
> >
> >
> > On Fri, Apr 3, 2009 at 6:27 AM, Jan G.B. 
> wrote:
> >>
> >> Igor,
> >> what are you doing here? You say I'm arguing to show how big I am, but
> >> that's not true. I corrected your misleading tipps like using JSCRIPT
> >> to have form essentials and using xhtml in an html context.
> >> no reason to get personal and/or offending.
> >>
> >> bye.
> >>
> >>
> >> 2009/4/2 Igor Escobar :
> >> > I'm sorry, you is the master o/
> >>
> >> > shame on you.
> >>
> >> > Who you think you is? everybody is here to pass something for the
> >> > others and learn something, everything i wrote its just  to help, if
> you
> >> > are
> >> > compete with others showing how much bigger you is, go to a
> championship
> >> > or
> >> > something.
> >> >
> >> > Have a nice day.
> >> >
> >> > Regards,
> >> > Igor Escoar
> >> > Systems Analyst & Interface Designer
> >> >
> >> > --
> >> >
> >> > Personal Blog
> >> > ~ blog.igorescobar.com
> >> > Online Portifolio
> >> > ~ www.igorescobar.com
> >> > Twitter
> >> > ~ @igorescobar
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > On Thu, Apr 2, 2009 at 11:01 AM, Jan G.B. 
> >> > wrote:
> >> >>
> >> >> 2009/4/2 Igor Escobar :
> >> >> > If you don't want change your form, do some function in Javascript
> >> >> > witch
> >> >> > control the last button you clicked.
> >> >> >
> >> >>
> >> >> Javascript is bad and you don't need it.
> >> >>
> >> >> >>  value="1">Delete
> >> >> >>  value="2">Delete
> >> >> >>  value="3">Delete
> >> >> >
> >> >> >  />
> >> >> >
> >> >> > I wanna make a advice to you learn more about HTML and Web
> >> >> > Standards...
> >> >>
> >> >> I want give an advice to you: learn to make a difference out of HTML
> >> >> and XHTML. It's not the same, and  is XHTML.
> >> >>
> >> >> > Don't use button type... use "input" type...
> >> >> >
> >> >>
> >> >> You forgot to mention *why* he should he use !
> >> >>
> >> >>  is supported by all major browsers! So there's no need to
> use
> >> >>  instead ...
> >> >>
> >> >> But having several  or  tags in one form element with
> >> >> the same NAME="" value makes no sense! Only the last one in the code
> >> >> will be submitted.
> >> >> Also, the LABEL for the button should be written like that:  >> >> name="x1" value="0815">LABEL GOES HERE
> >> >>
> >> >> http://www.w3schools.com/tags/tag_button.asp
> >> >>
> >> >>
> >> >> Using  might be more future-oriented.. ;)
> >> >>
> >> >>
> >> >>
> >> >> > Your javascript (using jQuery) sems like this
> >> >> >
> >> >>
> >> >> Installing and using "jquery" to have three buttons is overkill. not
> >> >> more, not less!
> >> >>
> >> >>
> >> >> byebye
> >> >>
> >> >> > $("input[name='btid']").click(function() {
> >> >> > $('#last_buttom').attr('value', $(this).val());
> >> >> > });
> >> >> >
> >> >> > And then you submit your form or something, the input "last_buttom"
> >> >> > are
> >> >> > with
> >> >> > the value of the buttom you has clicked at last time.
> >> >> >
> >> >> > Regards,
> >> >> > Igor Escobar
> >> >> > systems analyst & interface designer
> >> >> > www . igorescobar . com
> >> >> >
> >> >> >
> >> >> >
> >> >> > On Thu, Apr 2, 2009 at 8:29 AM, Phpster  wrote:
> >> >> >
> >> >> >> What about styling a link to look like a button with css? It won't
> >> >> >> be
> >> >> >> an
> >> >> >> exact match style wise but you can get close. I have done this
> >> >> >> succesfully
> >> >> >>
> >> >> >> Bastien
> >> >> >>
> >> >> >> Sent from my iPod
> >> >> >>
> >> >> >>
> >> >> >> On Apr 2, 2009, at 6:04, "Angus Mann" 
> wrote:
> >> >> >>
> >> >> >>  Hi all.
> >> >> >>>
> >> >> >>> I want to have several delete buttons with just one form, and
> >> >> >>> depending on
> >> >> >>> which button is pressed, one of several items is deleted.
> >> >> >>>
> >> >> >>> So I need multiple submit buttons for 1 form, each displaying the
> >> >> >>> same
> >> >> >>> text "Delete" to the user, but each with a different "value" so
> the
> >> >> >>> PHP
> >> >> >>> script can tell them apart.
> >> >> >>>
> >> >> >>> I've used this code for the buttons...
> >> >> >>>  value="1">Delete
> >> >> >>>  value="2">Delete
> >> >> >>>  value="3">Delete
> >> >> >>>
> >> >> >>> And it works just fine with firefox. But IE does not see

Re: [PHP] Button id's - firefox and IE different ?

2009-04-03 Thread Jan G.B.
Is it mandatory to annoy the whole list with your crap?
If you want to keep on informing me or insulting me or feel free to
send it directly to me. I'll add you to my killfile in no time.
get a life

2009/4/3 Igor Escobar :
> Better then READ is UNDERSTAND.
>
>> >> >> 2009/4/2 Igor Escobar :
>> >> >> > If you don't want change your form, do some function in Javascript
>> >> >> > witch
>> >> >> > control the last button you clicked.

> Regards,
> Igor Escoar
> Systems Analyst & Interface Designer
>

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



Re: [PHP] Oracle's dump to MySQL

2009-04-03 Thread 9el
On Fri, Apr 3, 2009 at 5:21 PM, Phpster  wrote:

> Extract to csv/XML?
>

My main goal is to import the data from Oracle DB to mySQL for a live site I
wrote in php. I dont know a better way to do that.


Re: [PHP] Button id's - firefox and IE different ?

2009-04-03 Thread Igor Escobar
ZZzz.

What what ? oh sorry, i fell in sleep.

Whatever, end of discussion.

Regards,
Igor Escoar
Systems Analyst & Interface Designer

--

Personal Blog
~ blog.igorescobar.com
Online Portifolio
~ www.igorescobar.com
Twitter
~ @igorescobar





On Fri, Apr 3, 2009 at 11:40 AM, Jan G.B.  wrote:

> Is it mandatory to annoy the whole list with your crap?
> If you want to keep on informing me or insulting me or feel free to
> send it directly to me. I'll add you to my killfile in no time.
> get a life
>
> 2009/4/3 Igor Escobar :
> > Better then READ is UNDERSTAND.
> >
> >> >> >> 2009/4/2 Igor Escobar :
> >> >> >> > If you don't want change your form, do some function in
> Javascript
> >> >> >> > witch
> >> >> >> > control the last button you clicked.
>
> > Regards,
> > Igor Escoar
> > Systems Analyst & Interface Designer
> >
>


RE: [PHP] Oracle's dump to MySQL

2009-04-03 Thread Bob McConnell
On Behalf Of 9el
> On Fri, Apr 3, 2009 at 5:21 PM, Phpster  wrote:
> 
>> Extract to csv/XML?
>>
> 
> My main goal is to import the data from Oracle DB to mySQL for a live
site I
> wrote in php. I dont know a better way to do that.

The strategy depends on how complicated the database is. If it is single
table, then Oracle can export that to a CSV file which MySQL can import.
You simply have to make sure the column types match. If it is more
complex, then you need to spend some time translating the relationships
from the Oracle schema into a MySQL schema. There is no one to one
correspondence here, in spite of the promises of the SQL standards. Once
you have done that, you may still be able to use the CSV files, but will
need to determine what order to import them and how to restore the
relevant indexes.

Bob McConnell

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



Re: [PHP] Oracle's dump to MySQL

2009-04-03 Thread 9el
On Fri, Apr 3, 2009 at 8:56 PM, Bob McConnell  wrote:

> On Behalf Of 9el
>
>
> The strategy depends on how complicated the database is. If it is single
> table, then Oracle can export that to a CSV file which MySQL can import.
> You simply have to make sure the column types match. If it is more
> complex, then you need to spend some time translating the relationships
> from the Oracle schema into a MySQL schema. There is no one to one
> correspondence here, in spite of the promises of the SQL standards. Once
> you have done that, you may still be able to use the CSV files, but will
> need to determine what order to import them and how to restore the
> relevant indexes.
>

I think this idea solves it a lot. i have like 4 to 7 tables only and both
database has the same schema. So, CSV would be a good idea. I just thinking
of a better idea to eliminate manual tasks it involves here.

And reading from CSV, that I can manage with phpCodes or using the params in
MySQL. READ Local INFILE

>
>
> Bob McConnell
>


Re: [PHP]scheduled task in php IN FIREFOX

2009-04-03 Thread Stuart
2009/4/3 Andrew Williams :
> That is a better idea but the program needs about five minutes to complete.
> Would that not be a problem?

No more so that it would be in a browser.

-Stuart

> On Fri, Apr 3, 2009 at 2:44 PM, Stuart  wrote:
>>
>> Please include the list when replying.
>>
>> 2009/4/3 Andrew Williams :
>> > interval update
>>
>> I'm sorry, and that means what exactly?
>>
>> Assuming you just need to hit a certain URL periodically you just need
>> to use curl or similar. There's no need to get a browser involved.
>>
>> -Stuart
>>
>> > On Fri, Apr 3, 2009 at 2:05 PM, Stuart  wrote:
>> >>
>> >> 2009/4/3 Andrew Williams :
>> >> > HOW DO YOU CONFIGURE scheduled task to use firefox instead of
>> >> > Internet
>> >> > Explorer
>> >>
>> >> Why is a scheduled task using a browser at all? What is the task doing?
>> >>
>> >> -Stuart
>> >>
>> >> --
>> >> http://stut.net/
>> >
>> >
>> >
>> > --
>> > Best Wishes
>> > Andrew Williams
>> >
>> >
>> >
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>
>
>
> --
> Best Wishes
> Andrew Williams
>
>
>

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



[PHP] rft file problems

2009-04-03 Thread tedd

Hi gang:

I'm trying to provide an ".rft" file via a link on one of my sites, like so:

Mid Term

but clicking the link results in a "Not Found" error.

However, if I change the suffix to .txt, then the file is found, but 
not presented correctly.


What's up with that and what can I do to fix it?

Thanks,

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



[PHP] PHP class or functions to manipulate PDF metadata?

2009-04-03 Thread O. Lavell
Hi group,

I am looking for an easy way to manipulate (read, write) the metadata 
(title, subject, keywords, author) in PDF files through PHP.

Most PHP/PDF solutions I have found so far (through Google) are aimed at 
constructing PDFs from text and graphics, with lots of fancy features, 
but most of them omit metadata functions altogether.

I would also prefer something extremely lightweight that I could just 
include_once() into my script, i.e. not a module or external program. I 
am currently using pdfinfo from xpdf-utils, but it has to go.

My use case is I want to build a database with the metadata of a bunch 
(many hundreds, perhaps thousands) of PDF files in a directory on the 
server for easy search, statistics and retrieval. I also want users to be 
able to make edits to any PDF's metadata from the web.

If it can be at all avoided, I would rather not have to invent the wheel 
myself here. I have looked at the Adobe PDF specification a bit and it 
looks quite... challenging. Or should I say daunting.

Any and all suggestions are welcome. Thank you in advance.


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



[PHP] concat and join stuff

2009-04-03 Thread PJ
Here some code that works fine, but...
"SELECT b.*, c.publisher,
CONCAT_WS(' ', first_name, last_name) AS Author
FROM book AS b
LEFT JOIN book_publisher as abc ON b.id = abc.bookID
LEFT JOIN publishers AS c ON abc.publishers_id = c.id
LEFT JOIN book_author AS ab ON b.id = ab.bookID
LEFT JOIN author AS a ON ab.authID=a.id
WHERE LEFT(last_name, 1 ) = '$Auth' ";
This works fine if there is only 1 author for the book; if there are two
they don't show up. I guess I can retrieve the authors from a separate
query, which is not a problem; I just thought it might be better to do
one query as that simplifies the rest of the code.
But doin just one query, would that put a heavier load on the db than
doing several queries?
I would like to modify things to get another Author in there. I had
hoped that it would be possible to do something like
CONCAT_WS(' ', first_name, last_name) WHERE ab.ordinal = 1 AS Author
CONCAT_WS(' ', first_name, last_name) WHERE ab.ordinal = 2 AS Author1
but MySQL doesn't like my creativity.
Or would it be better to join with first_name, last_name, ordinal and
then sort it out from the results...


-- 
unheralded genius: "A clean desk is the sign of a dull mind. "
-
Phil Jourdan --- p...@ptahhotep.com
   http://www.ptahhotep.com
   http://www.chiccantine.com/andypantry.php


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



[PHP] What is wrong with this code

2009-04-03 Thread Gary
This is driving me nuts.  I am getting blank emails and the only information 
that is being passed to MySQL is the IP address.

Can someone tell me what is wrong with this?


 
   If you can see this, it's an anti-spam measure.  Please don't
   fill in the address field.
   Address
   

   Name:
   
   Email Address:


Comments:



';
echo 'You have supplied the following information:';
echo 'Name: $name ';
echo 'Email Address: $email ';
echo 'Comments: $comments';

?> 



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



Re: [PHP] What is wrong with this code

2009-04-03 Thread Igor Escobar
You forgot to mention the "method" of the form.

 ... 

Regards,
Igor Escoar
Systems Analyst & Interface Designer

--

Personal Blog
~ blog.igorescobar.com
Online Portifolio
~ www.igorescobar.com
Twitter
~ @igorescobar





On Fri, Apr 3, 2009 at 4:08 PM, Gary  wrote:

> This is driving me nuts.  I am getting blank emails and the only
> information
> that is being passed to MySQL is the IP address.
>
> Can someone tell me what is wrong with this?
>
> 
>  
>   If you can see this, it's an anti-spam measure.  Please don't
>   fill in the address field.
>   Address
>   
>
>   Name:
>   
>   Email Address:
> 
> 
> Comments:
> 
> 
>
> 
> // Receiving variables
>
>
> $ip= $_SERVER['REMOTE_ADDR'];
> $name = $_POST['name'];
> $email = $_POST['email'];
> $comments = $_POST['comments'];
>
> //spam filter, do not touch
>  if ($_POST['address'] != '' ){
>
>
> die("Changed field");
>
>}
>
> //endo fo spam filter
>
> $header = "From: $email\n"
> . "Reply-To: $email\n";
> $subject = "Response from Assessment Lawyer";
> $email_to = "sanitized";
> $message = "name: $name\n"
> . "email: $email\n"
> . "comments: $comments\n"
> ."Visitors IP: $ip\n";
> mail($email_to, $subject, $message, $header);
>
>
>
>
> $dbc= mysqli_connect(sanitized,sanitized,sanitized,sanitized)// I have
> removed the actual information, but it was connecting!
> or die('Could not connect to db');
>
> $query = "INSERT INTO sanitized VALUES(0,'$name',
> '$email','$comments','$ip')";
>
> $result = mysqli_query($dbc, $query)
> or die('Error querying database.');
>
>
>
>mysqli_close($dbc);
>
> echo 'Thank you $name for submitting your inquiry!';
> echo 'You have supplied the following information:';
> echo 'Name: $name ';
> echo 'Email Address: $email ';
> echo 'Comments: $comments';
>
> ?>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Re: [PHP] What is wrong with this code

2009-04-03 Thread Gary
Its there...


"Igor Escobar"  wrote in message 
news:1f5251d50904031212o6fcc3e43q5c60b7ae373e9...@mail.gmail.com...
> You forgot to mention the "method" of the form.
>
>  ... 
>
> Regards,
> Igor Escoar
> Systems Analyst & Interface Designer
>
> --
>
> Personal Blog
> ~ blog.igorescobar.com
> Online Portifolio
> ~ www.igorescobar.com
> Twitter
> ~ @igorescobar
>
>
>
>
>
> On Fri, Apr 3, 2009 at 4:08 PM, Gary  wrote:
>
>> This is driving me nuts.  I am getting blank emails and the only
>> information
>> that is being passed to MySQL is the IP address.
>>
>> Can someone tell me what is wrong with this?
>>
>> 
>>  
>>   If you can see this, it's an anti-spam measure.  Please don't
>>   fill in the address field.
>>   Address
>>   
>>
>>   Name:
>>   
>>   Email Address:
>> 
>> 
>> Comments:
>> 
>> 
>>
>> >
>> // Receiving variables
>>
>>
>> $ip= $_SERVER['REMOTE_ADDR'];
>> $name = $_POST['name'];
>> $email = $_POST['email'];
>> $comments = $_POST['comments'];
>>
>> //spam filter, do not touch
>>  if ($_POST['address'] != '' ){
>>
>>
>> die("Changed field");
>>
>>}
>>
>> //endo fo spam filter
>>
>> $header = "From: $email\n"
>> . "Reply-To: $email\n";
>> $subject = "Response from Assessment Lawyer";
>> $email_to = "sanitized";
>> $message = "name: $name\n"
>> . "email: $email\n"
>> . "comments: $comments\n"
>> ."Visitors IP: $ip\n";
>> mail($email_to, $subject, $message, $header);
>>
>>
>>
>>
>> $dbc= mysqli_connect(sanitized,sanitized,sanitized,sanitized)// I have
>> removed the actual information, but it was connecting!
>> or die('Could not connect to db');
>>
>> $query = "INSERT INTO sanitized VALUES(0,'$name',
>> '$email','$comments','$ip')";
>>
>> $result = mysqli_query($dbc, $query)
>> or die('Error querying database.');
>>
>>
>>
>>mysqli_close($dbc);
>>
>> echo 'Thank you $name for submitting your inquiry!';
>> echo 'You have supplied the following information:';
>> echo 'Name: $name ';
>> echo 'Email Address: $email ';
>> echo 'Comments: $comments';
>>
>> ?>
>>
>>
>>
>> --
>> 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] What is wrong with this code

2009-04-03 Thread kyle.smith
Try something like print_r on $_POST to see if it contains *anything*,
seems like it's empty?!

Also, when you say blank emails I assume you mean they have the template
you made but the variables are empty and not zero-length emails.

-Original Message-
From: Gary [mailto:gwp...@ptd.net] 
Sent: Friday, April 03, 2009 3:14 PM
To: php-general@lists.php.net
Subject: Re: [PHP] What is wrong with this code

Its there...


"Igor Escobar"  wrote in message
news:1f5251d50904031212o6fcc3e43q5c60b7ae373e9...@mail.gmail.com...
> You forgot to mention the "method" of the form.
>
>  ... 
>
> Regards,
> Igor Escoar
> Systems Analyst & Interface Designer
>
> --
>
> Personal Blog
> ~ blog.igorescobar.com
> Online Portifolio
> ~ www.igorescobar.com
> Twitter
> ~ @igorescobar
>
>
>
>
>
> On Fri, Apr 3, 2009 at 4:08 PM, Gary  wrote:
>
>> This is driving me nuts.  I am getting blank emails and the only 
>> information that is being passed to MySQL is the IP address.
>>
>> Can someone tell me what is wrong with this?
>>
>>   
>> 
>>   If you can see this, it's an anti-spam measure.  Please don't
>>   fill in the address field.
>>   Address
>>   
>>
>>   Name:
>>   
>>   Email Address: > type="text" />  Comments: > name="comments" cols="50" rows=""> > type="button" value="submit" />
>>
>> >
>> // Receiving variables
>>
>>
>> $ip= $_SERVER['REMOTE_ADDR'];
>> $name = $_POST['name'];
>> $email = $_POST['email'];
>> $comments = $_POST['comments'];
>>
>> //spam filter, do not touch
>>  if ($_POST['address'] != '' ){
>>
>>
>> die("Changed field");
>>
>>}
>>
>> //endo fo spam filter
>>
>> $header = "From: $email\n"
>> . "Reply-To: $email\n";
>> $subject = "Response from Assessment Lawyer"; $email_to = 
>> "sanitized"; $message = "name: $name\n"
>> . "email: $email\n"
>> . "comments: $comments\n"
>> ."Visitors IP: $ip\n";
>> mail($email_to, $subject, $message, $header);
>>
>>
>>
>>
>> $dbc= mysqli_connect(sanitized,sanitized,sanitized,sanitized)// I 
>> have removed the actual information, but it was connecting!
>> or die('Could not connect to db');
>>
>> $query = "INSERT INTO sanitized VALUES(0,'$name', 
>> '$email','$comments','$ip')";
>>
>> $result = mysqli_query($dbc, $query)
>> or die('Error querying database.');
>>
>>
>>
>>mysqli_close($dbc);
>>
>> echo 'Thank you $name for submitting your inquiry!'; echo 'You 
>> have supplied the following information:'; echo 'Name: $name 
>> '; echo 'Email Address: $email '; echo 'Comments: 
>> $comments';
>>
>> ?>
>>
>>
>>
>> --
>> 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What is wrong with this code

2009-04-03 Thread Gary
I recieve an email, it will contain the ip address, it will also contain the 
name:, email: , comments:  but not the information from the form of the 
name or email or comments.

The database also recieves only the ip address.  So I assume those parts are 
working, but I cant seem to find why the others are not.

Thanks for your reply.

Gary

""kyle.smith""  wrote in message 
news:d3fe56d174abf6469079ca1a5c8474a804fa9...@nsmail01.inforonics.corp...
Try something like print_r on $_POST to see if it contains *anything*,
seems like it's empty?!

Also, when you say blank emails I assume you mean they have the template
you made but the variables are empty and not zero-length emails.

-Original Message-
From: Gary [mailto:gwp...@ptd.net]
Sent: Friday, April 03, 2009 3:14 PM
To: php-general@lists.php.net
Subject: Re: [PHP] What is wrong with this code

Its there...


"Igor Escobar"  wrote in message
news:1f5251d50904031212o6fcc3e43q5c60b7ae373e9...@mail.gmail.com...
> You forgot to mention the "method" of the form.
>
>  ... 
>
> Regards,
> Igor Escoar
> Systems Analyst & Interface Designer
>
> --
>
> Personal Blog
> ~ blog.igorescobar.com
> Online Portifolio
> ~ www.igorescobar.com
> Twitter
> ~ @igorescobar
>
>
>
>
>
> On Fri, Apr 3, 2009 at 4:08 PM, Gary  wrote:
>
>> This is driving me nuts.  I am getting blank emails and the only
>> information that is being passed to MySQL is the IP address.
>>
>> Can someone tell me what is wrong with this?
>>
>> 
>> 
>>   If you can see this, it's an anti-spam measure.  Please don't
>>   fill in the address field.
>>   Address
>>   
>>
>>   Name:
>>   
>>   Email Address: > type="text" />  Comments: > name="comments" cols="50" rows=""> > type="button" value="submit" />
>>
>> >
>> // Receiving variables
>>
>>
>> $ip= $_SERVER['REMOTE_ADDR'];
>> $name = $_POST['name'];
>> $email = $_POST['email'];
>> $comments = $_POST['comments'];
>>
>> //spam filter, do not touch
>>  if ($_POST['address'] != '' ){
>>
>>
>> die("Changed field");
>>
>>}
>>
>> //endo fo spam filter
>>
>> $header = "From: $email\n"
>> . "Reply-To: $email\n";
>> $subject = "Response from Assessment Lawyer"; $email_to =
>> "sanitized"; $message = "name: $name\n"
>> . "email: $email\n"
>> . "comments: $comments\n"
>> ."Visitors IP: $ip\n";
>> mail($email_to, $subject, $message, $header);
>>
>>
>>
>>
>> $dbc= mysqli_connect(sanitized,sanitized,sanitized,sanitized)// I
>> have removed the actual information, but it was connecting!
>> or die('Could not connect to db');
>>
>> $query = "INSERT INTO sanitized VALUES(0,'$name',
>> '$email','$comments','$ip')";
>>
>> $result = mysqli_query($dbc, $query)
>> or die('Error querying database.');
>>
>>
>>
>>mysqli_close($dbc);
>>
>> echo 'Thank you $name for submitting your inquiry!'; echo 'You
>> have supplied the following information:'; echo 'Name: $name
>> '; echo 'Email Address: $email '; echo 'Comments:
>> $comments';
>>
>> ?>
>>
>>
>>
>> --
>> 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What is wrong with this code

2009-04-03 Thread Igor Escobar
If method POST is there and the information still empty...maybe you should
call to someone like a warlock... :D


Regards,
Igor Escoar
Systems Analyst & Interface Designer

--

Personal Blog
~ blog.igorescobar.com
Online Portifolio
~ www.igorescobar.com
Twitter
~ @igorescobar





On Fri, Apr 3, 2009 at 4:22 PM, Gary  wrote:

> I recieve an email, it will contain the ip address, it will also contain
> the
> name:, email: , comments:  but not the information from the form of the
> name or email or comments.
>
> The database also recieves only the ip address.  So I assume those parts
> are
> working, but I cant seem to find why the others are not.
>
> Thanks for your reply.
>
> Gary
>
> ""kyle.smith""  wrote in message
> news:d3fe56d174abf6469079ca1a5c8474a804fa9...@nsmail01.inforonics.corp...
> Try something like print_r on $_POST to see if it contains *anything*,
> seems like it's empty?!
>
> Also, when you say blank emails I assume you mean they have the template
> you made but the variables are empty and not zero-length emails.
>
> -Original Message-
> From: Gary [mailto:gwp...@ptd.net]
> Sent: Friday, April 03, 2009 3:14 PM
> To: php-general@lists.php.net
> Subject: Re: [PHP] What is wrong with this code
>
> Its there...
>
>
> "Igor Escobar"  wrote in message
> news:1f5251d50904031212o6fcc3e43q5c60b7ae373e9...@mail.gmail.com...
> > You forgot to mention the "method" of the form.
> >
> >  ... 
> >
> > Regards,
> > Igor Escoar
> > Systems Analyst & Interface Designer
> >
> > --
> >
> > Personal Blog
> > ~ blog.igorescobar.com
> > Online Portifolio
> > ~ www.igorescobar.com
> > Twitter
> > ~ @igorescobar
> >
> >
> >
> >
> >
> > On Fri, Apr 3, 2009 at 4:08 PM, Gary  wrote:
> >
> >> This is driving me nuts.  I am getting blank emails and the only
> >> information that is being passed to MySQL is the IP address.
> >>
> >> Can someone tell me what is wrong with this?
> >>
> >> 
> >> 
> >>   If you can see this, it's an anti-spam measure.  Please don't
> >>   fill in the address field.
> >>   Address
> >>   
> >>
> >>   Name:
> >>   
> >>   Email Address:  >> type="text" />  Comments:  >> name="comments" cols="50" rows="">  >> type="button" value="submit" />
> >>
> >>  >>
> >> // Receiving variables
> >>
> >>
> >> $ip= $_SERVER['REMOTE_ADDR'];
> >> $name = $_POST['name'];
> >> $email = $_POST['email'];
> >> $comments = $_POST['comments'];
> >>
> >> //spam filter, do not touch
> >>  if ($_POST['address'] != '' ){
> >>
> >>
> >> die("Changed field");
> >>
> >>}
> >>
> >> //endo fo spam filter
> >>
> >> $header = "From: $email\n"
> >> . "Reply-To: $email\n";
> >> $subject = "Response from Assessment Lawyer"; $email_to =
> >> "sanitized"; $message = "name: $name\n"
> >> . "email: $email\n"
> >> . "comments: $comments\n"
> >> ."Visitors IP: $ip\n";
> >> mail($email_to, $subject, $message, $header);
> >>
> >>
> >>
> >>
> >> $dbc= mysqli_connect(sanitized,sanitized,sanitized,sanitized)// I
> >> have removed the actual information, but it was connecting!
> >> or die('Could not connect to db');
> >>
> >> $query = "INSERT INTO sanitized VALUES(0,'$name',
> >> '$email','$comments','$ip')";
> >>
> >> $result = mysqli_query($dbc, $query)
> >> or die('Error querying database.');
> >>
> >>
> >>
> >>mysqli_close($dbc);
> >>
> >> echo 'Thank you $name for submitting your inquiry!'; echo 'You
> >> have supplied the following information:'; echo 'Name: $name
> >> '; echo 'Email Address: $email '; echo 'Comments:
> >> $comments';
> >>
> >> ?>
> >>
> >>
> >>
> >> --
> >> 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 General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


RE: [PHP] What is wrong with this code

2009-04-03 Thread kyle.smith
Well you're specifically missing anything that's in $_POST, which is why
I suggested getting yourself the exact contents of $_POST displayed to
the page. 

-Original Message-
From: Gary [mailto:gwp...@ptd.net] 
Sent: Friday, April 03, 2009 3:23 PM
To: php-general@lists.php.net
Subject: Re: [PHP] What is wrong with this code

I recieve an email, it will contain the ip address, it will also contain
the name:, email: , comments:  but not the information from the form of
the name or email or comments.

The database also recieves only the ip address.  So I assume those parts
are working, but I cant seem to find why the others are not.

Thanks for your reply.

Gary

""kyle.smith""  wrote in message
news:d3fe56d174abf6469079ca1a5c8474a804fa9...@nsmail01.inforonics.corp..
.
Try something like print_r on $_POST to see if it contains *anything*,
seems like it's empty?!

Also, when you say blank emails I assume you mean they have the template
you made but the variables are empty and not zero-length emails.

-Original Message-
From: Gary [mailto:gwp...@ptd.net]
Sent: Friday, April 03, 2009 3:14 PM
To: php-general@lists.php.net
Subject: Re: [PHP] What is wrong with this code

Its there...


"Igor Escobar"  wrote in message
news:1f5251d50904031212o6fcc3e43q5c60b7ae373e9...@mail.gmail.com...
> You forgot to mention the "method" of the form.
>
>  ... 
>
> Regards,
> Igor Escoar
> Systems Analyst & Interface Designer
>
> --
>
> Personal Blog
> ~ blog.igorescobar.com
> Online Portifolio
> ~ www.igorescobar.com
> Twitter
> ~ @igorescobar
>
>
>
>
>
> On Fri, Apr 3, 2009 at 4:08 PM, Gary  wrote:
>
>> This is driving me nuts.  I am getting blank emails and the only 
>> information that is being passed to MySQL is the IP address.
>>
>> Can someone tell me what is wrong with this?
>>
>>  
>> 
>>   If you can see this, it's an anti-spam measure.  Please don't
>>   fill in the address field.
>>   Address
>>   
>>
>>   Name:
>>   
>>   Email Address: > type="text" />  Comments: > name="comments" cols="50" rows=""> > type="button" value="submit" />
>>
>> >
>> // Receiving variables
>>
>>
>> $ip= $_SERVER['REMOTE_ADDR'];
>> $name = $_POST['name'];
>> $email = $_POST['email'];
>> $comments = $_POST['comments'];
>>
>> //spam filter, do not touch
>>  if ($_POST['address'] != '' ){
>>
>>
>> die("Changed field");
>>
>>}
>>
>> //endo fo spam filter
>>
>> $header = "From: $email\n"
>> . "Reply-To: $email\n";
>> $subject = "Response from Assessment Lawyer"; $email_to = 
>> "sanitized"; $message = "name: $name\n"
>> . "email: $email\n"
>> . "comments: $comments\n"
>> ."Visitors IP: $ip\n";
>> mail($email_to, $subject, $message, $header);
>>
>>
>>
>>
>> $dbc= mysqli_connect(sanitized,sanitized,sanitized,sanitized)// I 
>> have removed the actual information, but it was connecting!
>> or die('Could not connect to db');
>>
>> $query = "INSERT INTO sanitized VALUES(0,'$name', 
>> '$email','$comments','$ip')";
>>
>> $result = mysqli_query($dbc, $query)
>> or die('Error querying database.');
>>
>>
>>
>>mysqli_close($dbc);
>>
>> echo 'Thank you $name for submitting your inquiry!'; echo 'You 
>> have supplied the following information:'; echo 'Name: $name 
>> '; echo 'Email Address: $email '; echo 'Comments:
>> $comments';
>>
>> ?>
>>
>>
>>
>> --
>> 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 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] What is wrong with this code

2009-04-03 Thread Ray
On Friday 03 April 2009 13:08:45 Gary wrote:
> This is driving me nuts.  I am getting blank emails and the only
> information that is being passed to MySQL is the IP address.
>
> Can someone tell me what is wrong with this?
>
> 
>  
>If you can see this, it's an anti-spam measure.  Please don't
>fill in the address field.
>Address
>
>
>Name:
>
>Email Address:
> 
> 
> Comments:
> 
> 
shouldn't this   be submit?
>
> 
> // Receiving variables
>
>
> $ip= $_SERVER['REMOTE_ADDR'];
> $name = $_POST['name'];
> $email = $_POST['email'];
> $comments = $_POST['comments'];
>

I hope this is simplified code, and you're going to do more filtering above?

> //spam filter, do not touch
>  if ($_POST['address'] != '' ){
>
>
> die("Changed field");
>
> }
>
> //endo fo spam filter
>
> $header = "From: $email\n"
> . "Reply-To: $email\n";
> $subject = "Response from Assessment Lawyer";
> $email_to = "sanitized";
> $message = "name: $name\n"
> . "email: $email\n"
> . "comments: $comments\n"
> ."Visitors IP: $ip\n";
> mail($email_to, $subject, $message, $header);
>
>
>
>
> $dbc= mysqli_connect(sanitized,sanitized,sanitized,sanitized)// I have
> removed the actual information, but it was connecting!
> or die('Could not connect to db');
>
> $query = "INSERT INTO sanitized VALUES(0,'$name',
> '$email','$comments','$ip')";
>
> $result = mysqli_query($dbc, $query)
> or die('Error querying database.');
>
>
>
> mysqli_close($dbc);
>
> echo 'Thank you $name for submitting your inquiry!';
> echo 'You have supplied the following information:';
> echo 'Name: $name ';
> echo 'Email Address: $email ';
> echo 'Comments: $comments';
>
> ?>



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



Re: [PHP] What is wrong with this code

2009-04-03 Thread Gary
Um, I dont understand that?


"Igor Escobar"  wrote in message 
news:1f5251d50904031228rfab0ec3rf8d9dd248b57e...@mail.gmail.com...
> If method POST is there and the information still empty...maybe you should
> call to someone like a warlock... :D
>
>
> Regards,
> Igor Escoar
> Systems Analyst & Interface Designer
>
> --
>
> Personal Blog
> ~ blog.igorescobar.com
> Online Portifolio
> ~ www.igorescobar.com
> Twitter
> ~ @igorescobar
>
>
>
>
>
> On Fri, Apr 3, 2009 at 4:22 PM, Gary  wrote:
>
>> I recieve an email, it will contain the ip address, it will also contain
>> the
>> name:, email: , comments:  but not the information from the form of the
>> name or email or comments.
>>
>> The database also recieves only the ip address.  So I assume those parts
>> are
>> working, but I cant seem to find why the others are not.
>>
>> Thanks for your reply.
>>
>> Gary
>>
>> ""kyle.smith""  wrote in message
>> news:d3fe56d174abf6469079ca1a5c8474a804fa9...@nsmail01.inforonics.corp...
>> Try something like print_r on $_POST to see if it contains *anything*,
>> seems like it's empty?!
>>
>> Also, when you say blank emails I assume you mean they have the template
>> you made but the variables are empty and not zero-length emails.
>>
>> -Original Message-
>> From: Gary [mailto:gwp...@ptd.net]
>> Sent: Friday, April 03, 2009 3:14 PM
>> To: php-general@lists.php.net
>> Subject: Re: [PHP] What is wrong with this code
>>
>> Its there...
>>
>>
>> "Igor Escobar"  wrote in message
>> news:1f5251d50904031212o6fcc3e43q5c60b7ae373e9...@mail.gmail.com...
>> > You forgot to mention the "method" of the form.
>> >
>> >  ... 
>> >
>> > Regards,
>> > Igor Escoar
>> > Systems Analyst & Interface Designer
>> >
>> > --
>> >
>> > Personal Blog
>> > ~ blog.igorescobar.com
>> > Online Portifolio
>> > ~ www.igorescobar.com
>> > Twitter
>> > ~ @igorescobar
>> >
>> >
>> >
>> >
>> >
>> > On Fri, Apr 3, 2009 at 4:08 PM, Gary  wrote:
>> >
>> >> This is driving me nuts.  I am getting blank emails and the only
>> >> information that is being passed to MySQL is the IP address.
>> >>
>> >> Can someone tell me what is wrong with this?
>> >>
>> >> 
>> >> 
>> >>   If you can see this, it's an anti-spam measure.  Please don't
>> >>   fill in the address field.
>> >>   Address
>> >>   
>> >>
>> >>   Name:
>> >>   
>> >>   Email Address: > >> type="text" />  Comments: > >> name="comments" cols="50" rows=""> > >> type="button" value="submit" />
>> >>
>> >> > >>
>> >> // Receiving variables
>> >>
>> >>
>> >> $ip= $_SERVER['REMOTE_ADDR'];
>> >> $name = $_POST['name'];
>> >> $email = $_POST['email'];
>> >> $comments = $_POST['comments'];
>> >>
>> >> //spam filter, do not touch
>> >>  if ($_POST['address'] != '' ){
>> >>
>> >>
>> >> die("Changed field");
>> >>
>> >>}
>> >>
>> >> //endo fo spam filter
>> >>
>> >> $header = "From: $email\n"
>> >> . "Reply-To: $email\n";
>> >> $subject = "Response from Assessment Lawyer"; $email_to =
>> >> "sanitized"; $message = "name: $name\n"
>> >> . "email: $email\n"
>> >> . "comments: $comments\n"
>> >> ."Visitors IP: $ip\n";
>> >> mail($email_to, $subject, $message, $header);
>> >>
>> >>
>> >>
>> >>
>> >> $dbc= mysqli_connect(sanitized,sanitized,sanitized,sanitized)// I
>> >> have removed the actual information, but it was connecting!
>> >> or die('Could not connect to db');
>> >>
>> >> $query = "INSERT INTO sanitized VALUES(0,'$name',
>> >> '$email','$comments','$ip')";
>> >>
>> >> $result = mysqli_query($dbc, $query)
>> >> or die('Error querying database.');
>> >>
>> >>
>> >>
>> >>mysqli_close($dbc);
>> >>
>> >> echo 'Thank you $name for submitting your inquiry!'; echo 'You
>> >> have supplied the following information:'; echo 'Name: $name
>> >> '; echo 'Email Address: $email '; echo 'Comments:
>> >> $comments';
>> >>
>> >> ?>
>> >>
>> >>
>> >>
>> >> --
>> >> 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 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] What is wrong with this code

2009-04-03 Thread 9el
*Note:* It is worth noting that the mail() function is not suitable for
larger volumes of email in a loop. This function opens and closes an SMTP
socket for each email, which is not very efficient.
For the sending of large amounts of email, see the » PEAR::Mail, and »
PEAR::Mail_Queue packages.
*
Note:* The following RFCs may be useful: » RFC 1896, » RFC 2045, » RFC 2046,
» RFC 2047, » RFC 2048, » RFC 2049, and » RFC 2822.

Copy from PHP Manual.


RE: [PHP] What is wrong with this code

2009-04-03 Thread kyle.smith
This is unrelated, the email sends fine.  And it's one per submission. 

-Original Message-
From: doctortomor...@gmail.com [mailto:doctortomor...@gmail.com] On
Behalf Of 9el
Sent: Friday, April 03, 2009 3:37 PM
To: Gary
Cc: php-general@lists.php.net
Subject: Re: [PHP] What is wrong with this code

*Note:* It is worth noting that the mail() function is not suitable for
larger volumes of email in a loop. This function opens and closes an
SMTP socket for each email, which is not very efficient.
For the sending of large amounts of email, see the > PEAR::Mail, and >
PEAR::Mail_Queue packages.
*
Note:* The following RFCs may be useful: > RFC 1896, > RFC 2045, > RFC
2046, > RFC 2047, > RFC 2048, > RFC 2049, and > RFC 2822.

Copy from PHP Manual.

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



Re: [PHP] What is wrong with this code

2009-04-03 Thread Peter van der Does
On Fri, 3 Apr 2009 15:08:45 -0400
"Gary"  wrote:

> This is driving me nuts.  I am getting blank emails and the only
> information that is being passed to MySQL is the IP address.
> 
> Can someone tell me what is wrong with this?
> 

If this is in one file, as I assume it is, here's what is happening:
In browser type the URL.
Load page.
Show form.
Send email.
Echo.
Done

You should check if information is send and if it's not don't process
the $_POST cause the $_POST is empty.

Simplified:

 
   If you can see this, it's an anti-spam measure.  Please don't
   fill in the address field.
   Address
   

   Name:
   
   Email Address:


Comments:



';
echo 'You have supplied the following information:';
echo 'Name: $name ';
echo 'Email Address: $email ';
echo 'Comments: $comments';
}
?>

-- 
Peter van der Does

GPG key: E77E8E98
IRC: Ganseki on irc.freenode.net
Blog: http://blog.avirtualhome.com
Forums: http://forums.avirtualhome.com
Jabber ID: pvanderd...@gmail.com

GetDeb Package Builder
http://www.getdeb.net - Software you want for Ubuntu

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



Re: [PHP] What is wrong with this code

2009-04-03 Thread Gary
Peter

I had the

if ( isset( $_POST['submit'] ) ) {

in there and it did not work.

I have used this on several sites, the only difference is that I was tyring 
to contain it in one file.  I also created a file just to process the POST, 
but it still did not work.

I was thinkning it was something really simple like a mistyped word or 
misplaced " or ' or ().


"Peter van der Does"  wrote in message 
news:20090403154906.35844...@montecarlo.grandprix.int...
> On Fri, 3 Apr 2009 15:08:45 -0400
> "Gary"  wrote:
>
>> This is driving me nuts.  I am getting blank emails and the only
>> information that is being passed to MySQL is the IP address.
>>
>> Can someone tell me what is wrong with this?
>>
>
> If this is in one file, as I assume it is, here's what is happening:
> In browser type the URL.
> Load page.
> Show form.
> Send email.
> Echo.
> Done
>
> You should check if information is send and if it's not don't process
> the $_POST cause the $_POST is empty.
>
> Simplified:
> 
> 
>   If you can see this, it's an anti-spam measure.  Please don't
>   fill in the address field.
>   Address
>   
>
>   Name:
>   
>   Email Address:
> 
> 
> Comments:
> 
> 
>
> 
> if ( isset( $_POST['submit'] ) ) {
> // Receiving variables
>
>
> $ip= $_SERVER['REMOTE_ADDR'];
> ... all other stuff
>
> echo 'Thank you $name for submitting your inquiry!';
> echo 'You have supplied the following information:';
> echo 'Name: $name ';
> echo 'Email Address: $email ';
> echo 'Comments: $comments';
> }
> ?>
>
> -- 
> Peter van der Does
>
> GPG key: E77E8E98
> IRC: Ganseki on irc.freenode.net
> Blog: http://blog.avirtualhome.com
> Forums: http://forums.avirtualhome.com
> Jabber ID: pvanderd...@gmail.com
>
> GetDeb Package Builder
> http://www.getdeb.net - Software you want for Ubuntu 



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



Re: [PHP] What is wrong with this code

2009-04-03 Thread 9el
---
Use FreeOpenSourceSoftwares, Stop piracy, Let the developers live. Get
a Free CD of Ubuntu mailed to your door without any cost. Visit :
www.ubuntu.com
--


On Sat, Apr 4, 2009 at 1:56 AM, Gary  wrote:

> Peter
>
> I had the
>
> if ( isset( $_POST['submit'] ) ) {
>
> in there and it did not work.
>
> > <

 input name="submit" type="button" value="submit" />
shouldn't this   be submit?

Ray notified you of this try it out :)


Re: [PHP] What is wrong with this code

2009-04-03 Thread Gary
That was it, but Im sorry, I did not see that Ray had already pointed that 
out, so apologies to Ray and many thanks to everyone...

gary


"9el"  wrote in message 
news:79d892150904031305j6e1b00d4qed0d9fbf13437...@mail.gmail.com...
> ---
> Use FreeOpenSourceSoftwares, Stop piracy, Let the developers live. Get
> a Free CD of Ubuntu mailed to your door without any cost. Visit :
> www.ubuntu.com
> --
>
>
> On Sat, Apr 4, 2009 at 1:56 AM, Gary  wrote:
>
>> Peter
>>
>> I had the
>>
>> if ( isset( $_POST['submit'] ) ) {
>>
>> in there and it did not work.
>>
>> > <
>
> input name="submit" type="button" value="submit" />
> shouldn't this   be submit?
>
> Ray notified you of this try it out :)
> 



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



RE: [PHP] What is wrong with this code

2009-04-03 Thread kyle.smith
Wow can't believe I missed that.  I also was wondering why Ray mailed an
empty message... :) 

-Original Message-
From: doctortomor...@gmail.com [mailto:doctortomor...@gmail.com] On
Behalf Of 9el
Sent: Friday, April 03, 2009 4:05 PM
To: Gary
Cc: php-general@lists.php.net
Subject: Re: [PHP] What is wrong with this code

---
Use FreeOpenSourceSoftwares, Stop piracy, Let the developers live. Get a
Free CD of Ubuntu mailed to your door without any cost. Visit :
www.ubuntu.com
--


On Sat, Apr 4, 2009 at 1:56 AM, Gary  wrote:

> Peter
>
> I had the
>
> if ( isset( $_POST['submit'] ) ) {
>
> in there and it did not work.
>
> > <

 input name="submit" type="button" value="submit" />
shouldn't this   be submit?

Ray notified you of this try it out :)

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



[PHP] problem with PHP simplexml and doxygen generated XML

2009-04-03 Thread hessiess
I have bean trying to right a PHP script to generate XHTML code from the
class documentation xml files created by Doxygen(the HTML it outputs is
invalid, messy and virtually imposable to integrate into another web
page). One thing has bean causing problems, the tags which start with `@',
for example:

Code:
  SimpleXMLElement Object
  (
[...@attributes] => Array
(
[kind] => function
[id] => classhello_1f06929bd13d07b414a8be07c6db88074
[prot] => private
[static] => no
[const] => no
[explicit] => no
[inline] => yes
[virt] => non-virtual
)
  ...

I cannot seam to find a way to access these with simplexml, the following
code generates a syntax error for example.

Code:

print_r($xml->compounddef->sectiondef->memberdef[1]->@attributes);

Any advice would be gratily appreciated.


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



[PHP] Weird problem with T_gettext()

2009-04-03 Thread Michelle Konzack
Hello,

I need some help from german  coders  since  I  have  a  weird  encoding
problem.  Currently I am coding the new website 
and if I do not select any languages in my Webbrowser, it show correctly
english in the "Siteindex" (topmost block).

Now selecting "de" as prefered language is  working,  but  if  I  select
"de_DE" in  Firefox,  the  second  term  "About Us"  is  something  like
"Über Uns" insteed "Über Uns" because the Website is UTF-8.

This is realy weird, since the MO file  is  the  same  for  both  locale
versions.

Any hints or ideas?

Also it is weird, that "php-gettext" does not do a fallback, if  I  have
only "de" and not "de_DE".

Thanks, Greetings and nice Day/Evening
Michelle Konzack
Systemadministrator
24V Electronic Engineer
Tamay Dogan Network
Debian GNU/Linux Consultant

-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
# Debian GNU/Linux Consultant #
 Michelle Konzack
   Apt. 917
   50, rue de Soultz
Jabber linux4miche...@jabber.ccc.de   67100 Strasbourg/France
IRC #Debian (irc.icq.com) Tel. DE: +49 177 9351947
ICQ #328449886Tel. FR: +33  6  61925193


signature.pgp
Description: Digital signature


Re: [PHP] rft file problems

2009-04-03 Thread Paul M Foster
On Fri, Apr 03, 2009 at 01:18:08PM -0400, tedd wrote:

> Hi gang:
>
> I'm trying to provide an ".rft" file via a link on one of my sites, like 
> so:
>
> Mid Term
>
> but clicking the link results in a "Not Found" error.
>
> However, if I change the suffix to .txt, then the file is found, but
> not presented correctly.
>
> What's up with that and what can I do to fix it?
>
> Thanks,
>
> tedd

Just go to webbytedd.com. There's an example there. (Sorry, I couldn't
resist!)

Are you sure you don't mean ".rtf", as in Rich Text Format? If
misspelled that way, it could explain the problem.

Paul

-- 
Paul M. Foster

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



Re: [PHP] problem with PHP simplexml and doxygen generated XML

2009-04-03 Thread Phpster



On Apr 3, 2009, at 17:52, hessi...@hessiess.com wrote:

I have bean trying to right a PHP script to generate XHTML code from  
the
class documentation xml files created by Doxygen(the HTML it outputs  
is

invalid, messy and virtually imposable to integrate into another web
page). One thing has bean causing problems, the tags which start  
with `@',

for example:

Code:
 SimpleXMLElement Object
 (
   [...@attributes] => Array
   (
   [kind] => function
   [id] => classhello_1f06929bd13d07b414a8be07c6db88074
   [prot] => private
   [static] => no
   [const] => no
   [explicit] => no
   [inline] => yes
   [virt] => non-virtual
   )
 ...

I cannot seam to find a way to access these with simplexml, the  
following

code generates a syntax error for example.

Code:

print_r($xml->compounddef->sectiondef->memberdef[1]->@attributes);

Any advice would be gratily appreciated.


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



What about first stripping out the @ characters with str_replace and  
then attempting to load the XML? Maybe run it thru a few to do the  
best possible clean up?


Bastien 


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



[PHP] filter in phpself()

2009-04-03 Thread Michael A. Peters

I was looking over the output of phpfilter() and say the following:

Input Validation and Filtering  enabled
Revision$Revision: 1.52.2.45 $

I did recently (very recently) upgrade from php 5.2.5 to 5.2.9 and also 
upgraded my php pear to 1.7.2 (from whatever CentOS 5.2 had) - but I 
don't think pear stuff is shown in phpinfo()


I don't recall seeing that before. Is it new, and is it worth looking 
into using it in place of (or in addition to) HTML Purifier?


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



Re: [PHP] filter in phpself()

2009-04-03 Thread Michael A. Peters

Michael A. Peters wrote:

I was looking over the output of phpfilter() and say the following:

Input Validation and Filteringenabled
Revision$Revision: 1.52.2.45 $

I did recently (very recently) upgrade from php 5.2.5 to 5.2.9 and also 
upgraded my php pear to 1.7.2 (from whatever CentOS 5.2 had) - but I 
don't think pear stuff is shown in phpinfo()


I don't recall seeing that before. Is it new, and is it worth looking 
into using it in place of (or in addition to) HTML Purifier?




Nevermind - I found the php manual for it.
It has some useful stuff - IE FILTER_VALIDATE_EMAIL and 
FILTER_VALIDATE_INT that will reduce some of my code.


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