php-general Digest 12 Apr 2010 14:18:40 -0000 Issue 6688

Topics (messages 303993 through 304004):

Re: PHP & MYSQL sorting
        303993 by: kranthi
        303995 by: Nilesh Govindarajan
        304004 by: tedd

Re: need help w/ unfamiliar syntax
        303994 by: kranthi
        303996 by: Robert Cummings

Mail Function Problem
        303997 by: Alice Wei
        303999 by: Kevin Kinsey
        304000 by: Peter Lind
        304001 by: Alice Wei
        304002 by: Alexey Bovanenko
        304003 by: Alice Wei

Re: Inserting into multiple tables
        303998 by: Paul M Foster

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
You can use javascript to trigger an onclick function every time a checkbox
is selected.
The onclick function can make an ajax call to a remote php script which can
then make the database query.

--- End Message ---
--- Begin Message ---
On 04/12/10 05:46, Ernie Kemp wrote:
Simple idea I thought.

I need a webpage that displays a drop down list of number with a
checkbox on the side that when checked will select the database again
only in descending order.

Small database with maybe 100 records.

The user can click the submit button when they have located the correct
number.

The trick is to make the checkbox trigger a new Select statement.

Thanks.


Use jquery, trigger an ajax request onclick of that checkbox.

--
Nilesh Govindarajan
Site & Server Administrator
www.itech7.com
मेरा भारत महान !
मम भारत: महत्तम भवतु !

--- End Message ---
--- Begin Message ---
At 8:16 PM -0400 4/11/10, Ernie Kemp wrote:
Simple idea I thought.

I need a webpage that displays a drop down list of number with a checkbox on the side that when checked will select the database again only in descending order.
Small database with maybe 100  records.

The user can click the submit button when they have located the correct number.

The trick is to make the checkbox trigger a new Select statement.

Thanks.

Ernie:

<form name="myForm" action="" >
<input type="checkbox" name="sort" id="sort" onClick="getData(this)" >
</form>

The javascript getData() will have to launch a php script to get the data again OR you can simply sort the data yourself using sort().

Here's another idea using jQuery:

http://webbytedd.com/jquery/sortable-table/

Cheers,

tedd


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

--- End Message ---
--- Begin Message ---
guess you are looking for
http://www.php.net/manual/en/language.types.string.php#language.types.string.parsing

--- End Message ---
--- Begin Message ---


Daniel Egeberg wrote:
On Sun, Apr 11, 2010 at 20:30, lala <l...@mail.theorb.net> wrote:
Hi all,

I've wasted two days trying to find this in the documentation.  Google is no
help here either; they only index text.

While looking at some code using objects I came across this:

   $this->{$spec}

The example works with or without the curly braces, but I know they aren't
there for just for decoration ;)

Will somebody be so kind as to point me where in the docs this syntax is
explained?

tia

It's documented here:
http://php.net/manual/en/language.variables.variable.php

It works for function and class names as well.

The style used above is superfluous since no additional operations are being done within the braces and so the braces are redundant. This is why it works either way.

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP

--- End Message ---
--- Begin Message ---
Hi, 

I have an issue here where I see no PHP errors on my mail function usage, and 
yet I am not getting the mail in the desired account. Here is what I have for 
my PHP code:

$headers = "From: aj...@alumni.iu.edu";
$to = "aj...@alumni.iu.edu ";
$subject = "Comments Regarding My Studio";
$body = "From: $your_name\n E-Mail: $email\n Reason Contact: $question\n 
Comments:\n $comments";
mail($to, $subject, $body,$headers);

This is what I have in my PHP.ini:

[mail function]
; For Win32 only.
SMTP = smtp.live.com
smtp_port = 587

; For Win32 only.
sendmail_from = aj...@alumni.iu.edu

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =

; Force the addition of the specified parameters to be passed as extra 
parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =

Yet, I don't see any mail in my aj...@alumni.iu.edu Mailbox, can anyone on the 
list please give me some pointers on what I may have done wrong here?
Thanks for your help.
                                          
_________________________________________________________________
The New Busy is not the old busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3

--- End Message ---
--- Begin Message ---
Alice Wei wrote:
Hi, I have an issue here where I see no PHP errors on my mail
> function usage, and yet I am not getting the mail in the
> desired account. Here is what I have for my PHP code:

$headers = "From: aj...@alumni.iu.edu";
$to = "aj...@alumni.iu.edu ";
$subject = "Comments Regarding My Studio";
$body = "From: $your_name\n E-Mail: $email\n Reason Contact: $question\n Comments:\n 
$comments";
mail($to, $subject, $body,$headers);

I don't see any way for you to know if there are any errors.

Try this as a very basic start:

$headers = "From: aj...@alumni.iu.edu";
$to = "aj...@alumni.iu.edu ";
$subject = "Comments Regarding My Studio";
$body = "From: $your_name\n E-Mail: $email\n Reason Contact: $question\n Comments:\n 
$comments";
$success=mail($to, $subject, $body,$headers);

if ($success) {
   echo "Mail was sent successfully!";
} else {
   echo "Sending of mail failed!";
}



This is what I have in my PHP.ini:

[mail function]
; For Win32 only.
SMTP = smtp.live.com
smtp_port = 587

; For Win32 only.
sendmail_from = aj...@alumni.iu.edu

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =

; Force the addition of the specified parameters to be passed as extra 
parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =

Yet, I don't see any mail in my aj...@alumni.iu.edu Mailbox, can
> anyone on the list please give me some pointers on what I may have done wrong 
here?
Thanks for your help.

Thanks to the worldwide brotherhood of crooks known as spammers,
sending e-mail these days isn't nearly as easy as PHP makes it look.
You might wanna look into an "errors-to" header to help debug any
problems with sender authorization, bad ports, etc.

HTH,

KDK

--- End Message ---
--- Begin Message ---
On 12 April 2010 05:22, Kevin Kinsey <k...@daleco.biz> wrote:
>
> Thanks to the worldwide brotherhood of crooks known as spammers,
> sending e-mail these days isn't nearly as easy as PHP makes it look.
> You might wanna look into an "errors-to" header to help debug any
> problems with sender authorization, bad ports, etc.
>

Along these lines: there's a chance that sending a mail from yourself,
to yourself, through PHP like this, will cause mail servers to think
it's spam. For testing email sending, normal scenarios are better
(i.e. send an email to another account).

Regards
Peter

-- 
<hype>
WWW: http://plphp.dk / http://plind.dk
LinkedIn: http://www.linkedin.com/in/plind
Flickr: http://www.flickr.com/photos/fake51
BeWelcome: Fake51
Couchsurfing: Fake51
</hype>

--- End Message ---
--- Begin Message ---

> From: peter.e.l...@gmail.com
> Date: Mon, 12 Apr 2010 13:09:48 +0200
> Subject: Re: [PHP] Mail Function Problem
> To: k...@daleco.biz
> CC: aj...@alumni.iu.edu; php-gene...@lists.php.net
> 
> On 12 April 2010 05:22, Kevin Kinsey <k...@daleco.biz> wrote:
> >
> > Thanks to the worldwide brotherhood of crooks known as spammers,
> > sending e-mail these days isn't nearly as easy as PHP makes it look.
> > You might wanna look into an "errors-to" header to help debug any
> > problems with sender authorization, bad ports, etc.
> >
> 
> Along these lines: there's a chance that sending a mail from yourself,
> to yourself, through PHP like this, will cause mail servers to think
> it's spam. For testing email sending, normal scenarios are better
> (i.e. send an email to another account).
> 
> Regards
> Peter
> 
> -- 
> <hype>
> WWW: http://plphp.dk / http://plind.dk
> LinkedIn: http://www.linkedin.com/in/plind
> Flickr: http://www.flickr.com/photos/fake51
> BeWelcome: Fake51
> Couchsurfing: Fake51
> </hype>

I have changed my $to to $email, so it is not the same email address as the 
$from. I also added Kevin's lines with the parameters that April suggested, and 
it looks like I still get Sending Mail failed. Which function should I use to 
find out why my sending mail failed?

Thanks for your help.

Alice
                                          
_________________________________________________________________
The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with 
Hotmail. 
http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5

--- End Message ---
--- Begin Message ---
Hi!

You have the following php.ini params:
SMTP = smtp.live.com
smtp_port = 587

live.com not support relay and it requires authentication.


On Mon, Apr 12, 2010 at 6:33 AM, Alice Wei <aj...@alumni.iu.edu> wrote:

>
> Hi,
>
> I have an issue here where I see no PHP errors on my mail function usage,
> and yet I am not getting the mail in the desired account. Here is what I
> have for my PHP code:
>
> $headers = "From: aj...@alumni.iu.edu";
> $to = "aj...@alumni.iu.edu ";
> $subject = "Comments Regarding My Studio";
> $body = "From: $your_name\n E-Mail: $email\n Reason Contact: $question\n
> Comments:\n $comments";
> mail($to, $subject, $body,$headers);
>
> This is what I have in my PHP.ini:
>
> [mail function]
> ; For Win32 only.
> SMTP = smtp.live.com
> smtp_port = 587
>
> ; For Win32 only.
> sendmail_from = aj...@alumni.iu.edu
>
> ; For Unix only.  You may supply arguments as well (default: "sendmail -t
> -i").
> ;sendmail_path =
>
> ; Force the addition of the specified parameters to be passed as extra
> parameters
> ; to the sendmail binary. These parameters will always replace the value of
> ; the 5th parameter to mail(), even in safe mode.
> ;mail.force_extra_parameters =
>
> Yet, I don't see any mail in my aj...@alumni.iu.edu Mailbox, can anyone on
> the list please give me some pointers on what I may have done wrong here?
> Thanks for your help.
>
> _________________________________________________________________
> The New Busy is not the old busy. Search, chat and e-mail from your inbox.
>
> http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3




-- 
With regards,
Alexei Bovanenko

--- End Message ---
--- Begin Message ---

Date: Mon, 12 Apr 2010 15:26:46 +0400
Subject: Re: [PHP] Mail Function Problem
From: a.bovane...@gmail.com
To: aj...@alumni.iu.edu
CC: php-gene...@lists.php.net

Hi!
You have the following php.ini params:SMTP = smtp.live.com

smtp_port = 587
live.com not support relay and it requires authentication.

Is there an email account that I could try? I thought most email accounts 
requires authentication anyway.


Thanks for your help.

Alice

On Mon, Apr 12, 2010 at 6:33 AM, Alice Wei <aj...@alumni.iu.edu> wrote:



Hi,



I have an issue here where I see no PHP errors on my mail function usage, and 
yet I am not getting the mail in the desired account. Here is what I have for 
my PHP code:



$headers = "From: aj...@alumni.iu.edu";

$to = "aj...@alumni.iu.edu ";

$subject = "Comments Regarding My Studio";

$body = "From: $your_name\n E-Mail: $email\n Reason Contact: $question\n 
Comments:\n $comments";

mail($to, $subject, $body,$headers);



This is what I have in my PHP.ini:



[mail function]

; For Win32 only.

SMTP = smtp.live.com

smtp_port = 587



; For Win32 only.

sendmail_from = aj...@alumni.iu.edu



; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").

;sendmail_path =



; Force the addition of the specified parameters to be passed as extra 
parameters

; to the sendmail binary. These parameters will always replace the value of

; the 5th parameter to mail(), even in safe mode.

;mail.force_extra_parameters =



Yet, I don't see any mail in my aj...@alumni.iu.edu Mailbox, can anyone on the 
list please give me some pointers on what I may have done wrong here?

Thanks for your help.



_________________________________________________________________

The New Busy is not the old busy. Search, chat and e-mail from your inbox.

http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3


-- 
With regards,
Alexei Bovanenko

                                          
_________________________________________________________________
The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with 
Hotmail. 
http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5

--- End Message ---
--- Begin Message ---
On Sun, Apr 11, 2010 at 12:21:28AM -0400, Gary wrote:


<snip>

> 
> Most of the information about mutilple tables deals with the retreval of
> data from, not inserting into, meaning they are more used for known data
> inserted by the database owner/administrator to be retrieved by queries into
> the DB.
> 
> Am I on the right track?

Yes. The emphasis on multiple tables is mostly to ensure data integrity.
It goes back to the beginning of relational databases. And where you
have multiple tables, the most difficult task (and the one which takes
up the most pages in texts) is queries on those multiple tables.
Insertions are considered elementary, and they are typically done one
table at a time. You'll notice the syntax for queries is considerably
more complex than that for inserts, because the task is more complex.

Paul

-- 
Paul M. Foster

--- End Message ---

Reply via email to