php-windows Digest 2 Feb 2005 15:27:20 -0000 Issue 2561

Topics (messages 25501 through 25508):

Re: [PHP] php editor
        25501 by: Alp
        25502 by: Mikey
        25508 by: Jason Barnett

Re: 'Replacing' form data from a web table/database
        25503 by: George Pitcher

why isn't php being parsed?
        25504 by: Patrick Roane
        25505 by: lferro.teladigital.net
        25506 by: Patrick Roane
        25507 by: lferro.teladigital.net

Administrivia:

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

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

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
You might want to give a shot at TextPad.
http://www.textpad.com/
Alp

<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> It's true that googling would produce a list of PHP-happy editors, but the
intended question seems to be more along the lines of "What does everyone
like?  Use?  Prefer?"   That's not something that's always found on lists
you'd get off of google.
>
> Helpful responses aren't always ones that are technically correct.
>
> -TG
>
> = = = Original message = = =
>
> "Know any goog ones?"
>
> funny you should mention goog.. if you google'd "php editor" youd have
> your answer by now..
>
> cheers
> phpninja
>
> -----Original Message-----
> From: William Stokes [mailto:[EMAIL PROTECTED]
> Sent: Thursday, January 13, 2005 8:02 AM
> To: [email protected]
> Subject: [PHP] php editor
>
> Hello,
>
> I'm quite new with writing php code. I was considering of using some kind
of
> php editor program to help with the syntax. Know any goog ones?
>
> Thanks
> -Will
>
>
> ___________________________________________________________
> Sent by ePrompter, the premier email notification software.
> Free download at http://www.ePrompter.com.

--- End Message ---
--- Begin Message ---
> -----Original Message-----
> > It's true that googling would produce a list of PHP-happy 
> editors, but 
> > the
> intended question seems to be more along the lines of "What 
> does everyone
> like?  Use?  Prefer?"   That's not something that's always 
> found on lists
> you'd get off of google.

No, but it is something you can find out by searching the list archives.
This question has been going around for so many years now that it really
isn't funny.

Mikey

--- End Message ---
--- Begin Message --- Mikey wrote:
-----Original Message-----

It's true that googling would produce a list of PHP-happy

editors, but


the

intended question seems to be more along the lines of "What does everyone
like? Use? Prefer?" That's not something that's always found on lists
you'd get off of google.


No, but it is something you can find out by searching the list archives.
This question has been going around for so many years now that it really
isn't funny.

Mikey

Very true Mikey. In fact a few of us have been discussing (off list) a spec for a "parrot" that would automatically reply to FAQs such as this. If you're interested in contributing to our project... feel free to email me with [ParrotHeadPoster] in the email subject.



-- Teach a man to fish...

NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-general&w=2
STFM | http://www.php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php
LAZY | http://mycroft.mozdev.org/download.html?name=PHP&submitform=Find+search+plugins

--- End Message ---
--- Begin Message ---
Sorry about the cross-posting.

I've been a Filemaker user for around 10 years now. Its brilliant for small
scale applications, but over recent months, I've been porting a site based
on Filemaker v5 to PHP/MySQL. I am using PEARD:DB and the Smarty templating
engine.

One of the nice tricks in FM is the ability to select a field and have the
value of that field set in the current found set.

By using a little bit of javascript in the form, I am able to capture the
filed in focus, and have built a function that will form the SQL query so
that it takes account of the column type being selected.

This morning, I have extended this by making it work on a multi-row table.
So I can be working on a 75-row table and I can now update one of the
columns to store the data that I have selected in one of the rows (obviously
in the same column).

If anyone would like more info (and code snippets) please let me know off
list.

Cheers

George in Oxford

--- End Message ---
--- Begin Message ---
I am trying to include form-parsing code on the same
page as my hard-coded HTML form- but I'm doing
something wrong. The name of my file is chair1.html

Please see below:

thanks!



<!DOCTYPE html PUBLIC
        "-//W3C//DTD XHTML 1.0 Strict/EN"
        "http://www/w3/org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html>
<head>
<title>form</title>
<link rel="stylesheet" type="text/css" media="screen"
href="center.css">
<style type="text/css">


</style>
</head>
<body bgcolor="#999900">
<table border="0" cellpadding="5" width="100%"
bgcolor="#999900" class="rightsidebar"><tr>
<td>&nbsp</td>
<td align="center"><div id="whitetitle">Item
Ch1-1</div></td>
<td>&nbsp;&nbsp;&nbsp</td>

<body bgcolor="#999900">

<table border="0" cellpadding="0" width="100%"
align="left" bgcolor="#999900"
class="rightsidebar"><tr><td>&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td>&nbsp</td>

<td><img src="chair_pics/rt_chair.jpg" alt=""
height="304" width="160" border="0"
align="right"></td>
<td>&nbsp</td>
<td align="left"><ul>


<li>&#187;    Arm Chair</li> 
<li>&#187;    Beach wood</li>
<li>&#187;    Height: 42"</li> 
<li>&#187;    Seat: 19"w x 18 1/2d</li>

<td>&nbsp</td>
<td>&nbsp</td>
<td>&nbsp</td>


</ul>
</td>
</tr>

</table>
<table border="0" cellpadding="0" width="100%"
align="left" bgcolor="#999900"><tr><td>


<?php 
$to = "[EMAIL PROTECTED]"; //Change to the email you
want the form results to be sent to

$subject = "Form Results"; //Change to what you want
the title of the email to be

$headers = "From: Form Mailer";

$thankyouURL = "http://www.crost.com/test/index.html";;
//Change to the url you want the form to go to after
submit

$date = date ("l, F jS, Y"); 
$time = date ("h:i A"); 

$msg = "Submitted on $date at $time.\n\n"; 


if ($_SERVER['REQUEST_METHOD'] == "POST") {
        foreach ($_POST as $key => $value) { 
                $msg .= ucfirst ($key) ." : ". $value . "\n"; 
        }
} else {
        foreach ($_GET as $key => $value) { 
                $msg .= ucfirst ($key) ." : ". $value . "\n"; 
        }
}

mail($to, $subject, $msg, $headers);
header ("Location:$thankyouURL");

?>



<fieldset><legend align="center">Questions &
Comments</legend><br>


<form method="post" action="{' . $_SERVER['PHP_SELF']
. '}">
<input type="checkbox" name="Ch1-1[]" value="Ch1-1"
/>I'd like to purchase Item Ch1-1:
<input type="checkbox" name="similar_1[]"
value="similar_1" />Do you have something similar?
<input type="checkbox" name="browse_1[]"
value="browse_1" />Just browsing:
                        
                                
                                
<p>Name:<br />
<input type="text" name="user" /></p>
<p>Phone:<br />
<input type="text" name="phone" /></p><br />
Comments:<br />
<textarea name="Comments" rows="5"
cols="40"></textarea></fieldset>

<p><input type="submit" value="submit data" /></p>
</form>
</tr>
</td>
</table>
</body>
</html>


=====

----------------
"forget your lust for the rich man's gold. All that you need, is in your soul. 
You can do this if you try. All that I want for you my son, is to be satisfied"

  ~ Lynard Skynard

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

First, prolly, your file needs to be called chair1.php instead of chair.html...

Second, you should add something in the lines of:

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

.... email sending code here...

}

If not, the users, when they reach the page will send an empty form to the email...

Cheers,
Luis Ferro



Patrick Roane wrote:

I am trying to include form-parsing code on the same
page as my hard-coded HTML form- but I'm doing
something wrong. The name of my file is chair1.html

Please see below:

thanks!



<!DOCTYPE html PUBLIC
        "-//W3C//DTD XHTML 1.0 Strict/EN"
        "http://www/w3/org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html>
<head>
<title>form</title>
<link rel="stylesheet" type="text/css" media="screen"
href="center.css">
<style type="text/css">


</style> </head> <body bgcolor="#999900"> <table border="0" cellpadding="5" width="100%" bgcolor="#999900" class="rightsidebar"><tr> <td>&nbsp</td> <td align="center"><div id="whitetitle">Item Ch1-1</div></td> <td>&nbsp;&nbsp;&nbsp</td>

<body bgcolor="#999900">

<table border="0" cellpadding="0" width="100%"
align="left" bgcolor="#999900"
class="rightsidebar"><tr><td>&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td>&nbsp</td>

<td><img src="chair_pics/rt_chair.jpg" alt=""
height="304" width="160" border="0"
align="right"></td>
<td>&nbsp</td>
<td align="left"><ul>


<li>&#187; Arm Chair</li> <li>&#187; Beach wood</li>
<li>&#187; Height: 42"</li> <li>&#187; Seat: 19"w x 18 1/2d</li>


<td>&nbsp</td>
<td>&nbsp</td>
<td>&nbsp</td>


</ul> </td> </tr>

</table>
<table border="0" cellpadding="0" width="100%"
align="left" bgcolor="#999900"><tr><td>


<?php $to = "[EMAIL PROTECTED]"; //Change to the email you
want the form results to be sent to


$subject = "Form Results"; //Change to what you want
the title of the email to be

$headers = "From: Form Mailer";

$thankyouURL = "http://www.crost.com/test/index.html";;
//Change to the url you want the form to go to after
submit

$date = date ("l, F jS, Y"); $time = date ("h:i A");

$msg = "Submitted on $date at $time.\n\n";


if ($_SERVER['REQUEST_METHOD'] == "POST") {
foreach ($_POST as $key => $value) { $msg .= ucfirst ($key) ." : ". $value . "\n"; }
} else {
foreach ($_GET as $key => $value) { $msg .= ucfirst ($key) ." : ". $value . "\n"; }
}


mail($to, $subject, $msg, $headers);
header ("Location:$thankyouURL");

?>



<fieldset><legend align="center">Questions &
Comments</legend><br>


<form method="post" action="{' . $_SERVER['PHP_SELF'] . '}"> <input type="checkbox" name="Ch1-1[]" value="Ch1-1" />I'd like to purchase Item Ch1-1: <input type="checkbox" name="similar_1[]" value="similar_1" />Do you have something similar? <input type="checkbox" name="browse_1[]" value="browse_1" />Just browsing: <p>Name:<br /> <input type="text" name="user" /></p> <p>Phone:<br /> <input type="text" name="phone" /></p><br /> Comments:<br /> <textarea name="Comments" rows="5" cols="40"></textarea></fieldset>

<p><input type="submit" value="submit data" /></p>
</form>
</tr>
</td>
</table>
</body>
</html>


=====

----------------
"forget your lust for the rich man's gold. All that you need, is in your soul. You 
can do this if you try. All that I want for you my son, is to be satisfied"

 ~ Lynard Skynard




--- End Message ---
--- Begin Message ---
Thanks for the quick response. I tried your suggestion
and I do get an e-mail sent from the form when I test
it. The problem is, I only receive the date the form
was filled out minus any of the values. I also get the
error msg: 

Warning: Cannot add header information - headers
already sent by ...

I looked this up and added:

<?php 
    ob_start(); 
    
    // file content 
    
    ob_end_flush(); 
?> 
to my script, but I still get the error. 


--- "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:

> Hi there,
> 
> First, prolly, your file needs to be called
> chair1.php instead of 
> chair.html...
> 
> Second, you should add something in the lines of:
> 
> if (isset($_POST["submit"])) {
> 
> .... email sending code here...
> 
> }
> 
> If not, the users, when they reach the page will
> send an empty form to 
> the email...
> 
> Cheers,
> Luis Ferro
> 
> 
> 
> Patrick Roane wrote:
> 
> >I am trying to include form-parsing code on the
> same
> >page as my hard-coded HTML form- but I'm doing
> >something wrong. The name of my file is chair1.html
> >
> >Please see below:
> >
> >thanks!
> >
> >
> >
> ><!DOCTYPE html PUBLIC
> >     "-//W3C//DTD XHTML 1.0 Strict/EN"
> >
> "http://www/w3/org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
> ><html>
> ><head>
> ><title>form</title>
> ><link rel="stylesheet" type="text/css"
> media="screen"
> >href="center.css">
> ><style type="text/css">
> >
> >
> ></style>
> ></head>
> ><body bgcolor="#999900">
> ><table border="0" cellpadding="5" width="100%"
> >bgcolor="#999900" class="rightsidebar"><tr>
> ><td>&nbsp</td>
> ><td align="center"><div id="whitetitle">Item
> >Ch1-1</div></td>
> ><td>&nbsp;&nbsp;&nbsp</td>
> >
> ><body bgcolor="#999900">
> >
> ><table border="0" cellpadding="0" width="100%"
> >align="left" bgcolor="#999900"
>
>class="rightsidebar"><tr><td>&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp;&nbsp;&nbsp;</td>
> ><td>&nbsp</td>
> >
> ><td><img src="chair_pics/rt_chair.jpg" alt=""
> >height="304" width="160" border="0"
> >align="right"></td>
> ><td>&nbsp</td>
> ><td align="left"><ul>
> >
> >
> ><li>�    Arm Chair</li> 
> ><li>�    Beach wood</li>
> ><li>�    Height: 42"</li> 
> ><li>�    Seat: 19"w x 18 1/2d</li>
> >
> ><td>&nbsp</td>
> ><td>&nbsp</td>
> ><td>&nbsp</td>
> >
> >
> ></ul>
> ></td>
> ></tr>
> >
> ></table>
> ><table border="0" cellpadding="0" width="100%"
> >align="left" bgcolor="#999900"><tr><td>
> >
> >
> ><?php 
> >$to = "[EMAIL PROTECTED]"; //Change to the email you
> >want the form results to be sent to
> >
> >$subject = "Form Results"; //Change to what you
> want
> >the title of the email to be
> >
> >$headers = "From: Form Mailer";
> >
> >$thankyouURL =
> "http://www.crost.com/test/index.html";;
> >//Change to the url you want the form to go to
> after
> >submit
> >
> >$date = date ("l, F jS, Y"); 
> >$time = date ("h:i A"); 
> >
> >$msg = "Submitted on $date at $time.\n\n"; 
> >
> >
> >if ($_SERVER['REQUEST_METHOD'] == "POST") {
> >     foreach ($_POST as $key => $value) { 
> >             $msg .= ucfirst ($key) ." : ". $value . "\n"; 
> >     }
> >} else {
> >     foreach ($_GET as $key => $value) { 
> >             $msg .= ucfirst ($key) ." : ". $value . "\n"; 
> >     }
> >}
> >
> >mail($to, $subject, $msg, $headers);
> >header ("Location:$thankyouURL");
> >
> >?>
> >
> >
> >
> ><fieldset><legend align="center">Questions &
> >Comments</legend><br>
> >
> >
> ><form method="post" action="{' .
> $_SERVER['PHP_SELF']
> >. '}">
> ><input type="checkbox" name="Ch1-1[]" value="Ch1-1"
> >/>I'd like to purchase Item Ch1-1:
> ><input type="checkbox" name="similar_1[]"
> >value="similar_1" />Do you have something similar?
> ><input type="checkbox" name="browse_1[]"
> >value="browse_1" />Just browsing:
> >                     
> >                             
> >                             
> ><p>Name:<br />
> ><input type="text" name="user" /></p>
> ><p>Phone:<br />
> ><input type="text" name="phone" /></p><br />
> >Comments:<br />
> ><textarea name="Comments" rows="5"
> >cols="40"></textarea></fieldset>
> >
> ><p><input type="submit" value="submit data" /></p>
> ></form>
> ></tr>
> ></td>
> ></table>
> ></body>
> ></html>
> >
> >
> >=====
> >
> >----------------
> >"forget your lust for the rich man's gold. All that
> you need, is in your soul. You can do this if you
> try. All that I want for you my son, is to be
> satisfied"
> >
> >  ~ Lynard Skynard
> >
> >  
> >
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


=====

----------------
"forget your lust for the rich man's gold. All that you need, is in your soul. 
You can do this if you try. All that I want for you my son, is to be satisfied"

  ~ Lynard Skynard

--- End Message ---
--- Begin Message --- First of all, sorry to everyone... i forgot to remove the "return receipt" from my last mail... *blush*

The header info you get is because there was output prior to the "headers" manipulation (be it a session, cookie or anything else that uses the headers).

The resolution is fairly simple... change the php block to the top of the page...

The culprit is the line:

header ("Location:$thankyouURL");

Another thing that is worth something... if your smtp server works ok (some 
don't work 100%), the mail function returns a true value when the mail is sent 
correctly and a false when it can't send the mail...

You can redirect to diferent pages acording to it and in case of failure, ask 
for another kind of contact...

Cheers,
Luis Ferro




Patrick Roane wrote:

Thanks for the quick response. I tried your suggestion
and I do get an e-mail sent from the form when I test
it. The problem is, I only receive the date the form
was filled out minus any of the values. I also get the
error msg:


Warning: Cannot add header information - headers
already sent by ...

I looked this up and added:

<?php ob_start(); // file content ob_end_flush(); ?> to my script, but I still get the error.


--- "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:



Hi there,

First, prolly, your file needs to be called
chair1.php instead of chair.html...


Second, you should add something in the lines of:

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

.... email sending code here...

}

If not, the users, when they reach the page will
send an empty form to the email...


Cheers,
Luis Ferro



Patrick Roane wrote:



I am trying to include form-parsing code on the


same


page as my hard-coded HTML form- but I'm doing
something wrong. The name of my file is chair1.html

Please see below:

thanks!



<!DOCTYPE html PUBLIC
        "-//W3C//DTD XHTML 1.0 Strict/EN"



"http://www/w3/org/TR/xhtml1/DTD/xhtml1-strict.dtd";>


<html>
<head>
<title>form</title>
<link rel="stylesheet" type="text/css"


media="screen"


href="center.css">
<style type="text/css">


</style> </head> <body bgcolor="#999900"> <table border="0" cellpadding="5" width="100%" bgcolor="#999900" class="rightsidebar"><tr> <td>&nbsp</td> <td align="center"><div id="whitetitle">Item Ch1-1</div></td> <td>&nbsp;&nbsp;&nbsp</td>

<body bgcolor="#999900">

<table border="0" cellpadding="0" width="100%"
align="left" bgcolor="#999900"


class="rightsidebar"><tr><td>&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp;&nbsp;&nbsp;</td>


<td>&nbsp</td>

<td><img src="chair_pics/rt_chair.jpg" alt=""
height="304" width="160" border="0"
align="right"></td>
<td>&nbsp</td>
<td align="left"><ul>


<li>� Arm Chair</li> <li>� Beach wood</li>
<li>� Height: 42"</li> <li>� Seat: 19"w x 18 1/2d</li>


<td>&nbsp</td>
<td>&nbsp</td>
<td>&nbsp</td>


</ul> </td> </tr>

</table>
<table border="0" cellpadding="0" width="100%"
align="left" bgcolor="#999900"><tr><td>


<?php $to = "[EMAIL PROTECTED]"; //Change to the email you
want the form results to be sent to


$subject = "Form Results"; //Change to what you


want


the title of the email to be

$headers = "From: Form Mailer";

$thankyouURL =


"http://www.crost.com/test/index.html";;


//Change to the url you want the form to go to


after


submit

$date = date ("l, F jS, Y"); $time = date ("h:i A");

$msg = "Submitted on $date at $time.\n\n";


if ($_SERVER['REQUEST_METHOD'] == "POST") {
foreach ($_POST as $key => $value) { $msg .= ucfirst ($key) ." : ". $value . "\n"; }
} else {
foreach ($_GET as $key => $value) { $msg .= ucfirst ($key) ." : ". $value . "\n"; }
}


mail($to, $subject, $msg, $headers);
header ("Location:$thankyouURL");

?>



<fieldset><legend align="center">Questions &
Comments</legend><br>


<form method="post" action="{' .


$_SERVER['PHP_SELF']


. '}">
<input type="checkbox" name="Ch1-1[]" value="Ch1-1"
/>I'd like to purchase Item Ch1-1:
<input type="checkbox" name="similar_1[]"
value="similar_1" />Do you have something similar?
<input type="checkbox" name="browse_1[]"
value="browse_1" />Just browsing:
                        
                                
                                
<p>Name:<br />
<input type="text" name="user" /></p>
<p>Phone:<br />
<input type="text" name="phone" /></p><br />
Comments:<br />
<textarea name="Comments" rows="5"
cols="40"></textarea></fieldset>

<p><input type="submit" value="submit data" /></p>
</form>
</tr>
</td>
</table>
</body>
</html>


=====

----------------
"forget your lust for the rich man's gold. All that


you need, is in your soul. You can do this if you
try. All that I want for you my son, is to be
satisfied"


~ Lynard Skynard





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






=====

----------------
"forget your lust for the rich man's gold. All that you need, is in your soul. You 
can do this if you try. All that I want for you my son, is to be satisfied"

 ~ Lynard Skynard




--- End Message ---

Reply via email to