how to write simple scripts
| From: | Nicolas Windpassinger - Sun Microsystems | Date: | Fri, 20 Oct 2000 14:17:39 +0000 |
| Subject: | how to write simple scripts | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-21396@lists.php.net to get a copy of this message | ||
HI all,
I have used a lot php in html forms, but is it possible to use a php script
like a normal shell or perl one.
I have been trying with a little example:
example.php :
#!/space/server/apache_1.3.12/src/modules/
<?
$name="nico";
$age="32";
$suggestion="toto";
$mail_id="12";
$text="blabla";
$title = 'Mail Form';
$msg = 'Name: '.$name."\n";
$msg .= 'Age: '.$age."\n";
$msg .= 'Suggestions: '."\n".$suggestions."\n";
$msg .= 'Mail ID: '.$mail_id."\n";
$msg .= 'Text: '."\n".$text."\n";
mail('nicolas.windpassinger@sun.com',$title,$msg,'From: Whoever
<someone@somewhere.com>');
?>
then go onto my shell command and do: example.php
I don't know where the problem comes from:-is php only a html embedded
language?
-maybe my path is wrong! i also tried with ../modules/php4
-the problem should not be the mail. this is just a simple example, but i
would like to have this one right to get on more funny stuff.
tx,
nicolas