php-windows Digest 1 Nov 2002 16:01:56 -0000 Issue 1418
Topics (messages 16645 through 16659):
Submit
16645 by: Rodrigo San Martin
16646 by: Jarrad Kabral
16648 by: Ignatius Reilly
Form text with reserved chars
16647 by: news.php.net
16651 by: Miha Nedok
Re: fopen, fputs, fwrite, fclose, fdammit
16649 by: toby z
file download .......
16650 by: toby z
16656 by: erythros
Vriables via URL
16652 by: Cataphract
16654 by: DaMouse
Re: help in installation in PHP
16653 by: J Wynia
I could use some help
16655 by: Adrian Partenie
16657 by: Asendorf, John
Download.php
16658 by: DaMouse
Problem with php-script, possible a php.ini a fault....
16659 by: Svensson, B.A.T. (HKG)
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 ---
Halo
I have a question. Can I use a gif/jpg submit button instead of the standard
submit button in a form? If so, how?
------------------------------------------
Rodrigo San Martin
Institutt for datateknologi og informatikk
http://www.idi.ntnu.no/~rodrigo
--- End Message ---
--- Begin Message ---
<input type="image" name="whatever" src="image/path" />
-----Original Message-----
From: Rodrigo San Martin [mailto:rodrigo@;stud.ntnu.no]
Sent: Saturday, 2 November 2002 2:18 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Submit
Halo
I have a question. Can I use a gif/jpg submit button instead of the standard
submit button in a form? If so, how?
------------------------------------------
Rodrigo San Martin
Institutt for datateknologi og informatikk
http://www.idi.ntnu.no/~rodrigo
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
This element will not submit.
You have to write:
<input type="image" name="whatever" src="image/path"
onclick="javascript:submit()" />
Ignatius
____________________________________________
----- Original Message -----
From: "Jarrad Kabral" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 01, 2002 7:19 AM
Subject: RE: [PHP-WIN] Submit
> <input type="image" name="whatever" src="image/path" />
>
>
> -----Original Message-----
> From: Rodrigo San Martin [mailto:rodrigo@;stud.ntnu.no]
> Sent: Saturday, 2 November 2002 2:18 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Submit
>
>
> Halo
>
> I have a question. Can I use a gif/jpg submit button instead of the
standard
> submit button in a form? If so, how?
>
>
>
>
>
> ------------------------------------------
> Rodrigo San Martin
> Institutt for datateknologi og informatikk
>
> http://www.idi.ntnu.no/~rodrigo
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Hi NG.
I'm having trouble with form textareas containing " ' ". Every time I submit
a form holding this char php will insert "\" infront of it.
I'm well aware of the reason for this but I'd like to know just how to get
rid of the "\".
I've tried using ereg_replace("'","´",$text) but the "\" is inserted the
very second submit is invoked.
How do I get rid of the "\" or "\'" when I want to show the text the form
field was holding?
Also, I'd like to know if there is a smart way of replacing "spaces" and
"new line" in the text with the html code for this. Aka to make the view
exactly as it was typed in the field.
If anyone can help me with this it would be very much apreciated.
Regards
~ Aidal
--- End Message ---
--- Begin Message ---
Try set_magic_quotes_runtime(0) to get rid off \ .
Cheers
On Fri, 1 Nov 2002, news.php.net wrote:
> Date: Fri, 1 Nov 2002 08:37:50 +0100
> From: news.php.net <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Form text with reserved chars
>
> Hi NG.
>
> I'm having trouble with form textareas containing " ' ". Every time I submit
> a form holding this char php will insert "\" infront of it.
> I'm well aware of the reason for this but I'd like to know just how to get
> rid of the "\".
>
> I've tried using ereg_replace("'","´",$text) but the "\" is inserted the
> very second submit is invoked.
>
> How do I get rid of the "\" or "\'" when I want to show the text the form
> field was holding?
>
> Also, I'd like to know if there is a smart way of replacing "spaces" and
> "new line" in the text with the html code for this. Aka to make the view
> exactly as it was typed in the field.
>
> If anyone can help me with this it would be very much apreciated.
>
> Regards
> ~ Aidal
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
hay max
writin to a file is terrable .....
anyway
1st
>$pctarget = "/blogbits/".substr
>($target,0,6)."/_".$target."_bc.txt";
if this is a path ur tryin to specify change / to \
2nd try fwrite
fwrite($getcomments, "$title ");
or
fwrite($getcomments, "$addrecord");
hope this helps .....
good luck
toby.....
--- Max Graham <[EMAIL PROTECTED]> wrote: > I'm
trying to put a comment page on my weblog. I
> have the link displayed in
> the format of date first, then a link to bookmark
> the entry, and then a link
> to post a comment. I want to write the comments to a
> text file. My comment
> page accepts a default value of "target", which is
> set to the date to be
> commented on. Then it opens (or creates) a text file
> in the format of the
> variable set by $pctarget.
>
> $pctarget =
> )."/_".$target."_bc.txt";
> if ($newpost == "yes") {
> $addrecord =
>
$newpostname."\n".$newpostemail."\n".$newposturl."\n".date("l,
> F jS,
> Y")."\n".$newpostcomments."\n<br>";
> $fullcomments .= "-----splitcomment-----\n";
> $getcomments = fopen($pctarget, "a");
> fputs($getcomments, $addrecord);
> fclose($getcomments);
> }
>
> I've tried assigning fputs() and fclose() to
> variables (which I infer is the
> right way to do things but the manual isn't clear on
> it, i.e.
> $gc=fputs($getcomments, $addrecord); but that
> doesn't work either. When the
> page loads I get a blank page and this for the
> source:
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
> Transitional//EN">
> <HTML><HEAD>
> <META http-equiv=Content-Type content="text/html;
> charset=windows-1252"></HEAD>
> <BODY></BODY></HTML>
>
> It's not even the header source I told it to put
> out. As I understand it,
> this is the source put out by an error page, when
> the code won't run. I
> haven't been able to figure out what simple thing
> I'm missing, and I know
> it's simple because it invariably is. (Law of
> Murphy, don't ya know.)
>
> Any suggestions? Would lack of file permissions
> cause this? Server is a
> Linux box.
>
> Thanks in advance
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
--- End Message ---
--- Begin Message ---
hi guyz
im tryin to let a user download a file
when he clicks on the link a open from location or
save to disk dialog should appear
n i dont know how to do this
can n will sumbdy plz help
thnx a million
toby .....
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
--- End Message ---
--- Begin Message ---
its a normal hyperlink. when he clicks on it, if his browser dosent
recognize
the format it'll ask him to save it, or he can just right click it and
choose save
target. all you need is a hyperlink <a
href="http://www.domain.com/mydownload.bzg">download</a>
"Toby z" <[EMAIL PROTECTED]> wrote in message
news:20021101114520.12747.qmail@;web20809.mail.yahoo.com...
> hi guyz
>
> im tryin to let a user download a file
> when he clicks on the link a open from location or
> save to disk dialog should appear
>
>
> n i dont know how to do this
>
> can n will sumbdy plz help
>
>
> thnx a million
>
> toby .....
>
> __________________________________________________
> Do You Yahoo!?
> Everything you'll ever need on one web page
> from News and Sport to Email and Music Charts
> http://uk.my.yahoo.com
--- End Message ---
--- Begin Message ---
I've recently installed PHP4 with my Apache 1.3.27 (Windows XP) and I've
noticed some problems like the variables specified via URL being ignored.
http://127.0.0.1/teste.php?X=1
with teste.php:
<?php echo $X ?>
returns:
Notice: Undefined variable: X in f:\http\htdocs\teste.php on line 1
An example of another problem is that it doesn't know PHP_SELF.
<html><body>
<?php
if ( $a ) {
print( "a = $a" );
} else { // Form entry:
print( "<form action=\"$PHP_SELF\" method=post>\n" );
print( "a = <input type=text size=10 name=a ><br>\n" );
print( "<input type=submit value=Submit>\n" );
print( "</form>\n" );
}
?></body></html>
returns:
Notice: Undefined variable: a in f:\http\htdocs\teste.php on line 2
Notice: Undefined variable: PHP_SELF in f:\http\htdocs\teste.php on line 5
a = <input>
<submit>
The first notice is another thing beyond my comprehension.
I'd like to know whether anyone knows how to resolve this.
Thanks in advance.
--- End Message ---
--- Begin Message ---
try $_POST['a'] and $_SERVER['PHP_SELF']
----- Original Message -----
From: Cataphract <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 30, 2002 7:13 PM
Subject: [PHP-WIN] Vriables via URL
> I've recently installed PHP4 with my Apache 1.3.27 (Windows XP) and I've
> noticed some problems like the variables specified via URL being ignored.
> http://127.0.0.1/teste.php?X=1
>
> with teste.php:
> <?php echo $X ?>
>
> returns:
> Notice: Undefined variable: X in f:\http\htdocs\teste.php on line 1
>
> An example of another problem is that it doesn't know PHP_SELF.
>
> <html><body>
> <?php
> if ( $a ) {
> print( "a = $a" );
> } else { // Form entry:
> print( "<form action=\"$PHP_SELF\" method=post>\n" );
> print( "a = <input type=text size=10 name=a ><br>\n" );
> print( "<input type=submit value=Submit>\n" );
> print( "</form>\n" );
> }
> ?></body></html>
>
> returns:
>
> Notice: Undefined variable: a in f:\http\htdocs\teste.php on line 2
>
> Notice: Undefined variable: PHP_SELF in f:\http\htdocs\teste.php on line 5
>
> a = <input>
> <submit>
>
>
> The first notice is another thing beyond my comprehension.
> I'd like to know whether anyone knows how to resolve this.
>
> Thanks in advance.
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
PHP is an interpreted language that requires that all code be passed
through the interpreter. Since the browser doesn't have a PHP
interpreter built in, you need to install a web server in order to see
PHP scripts locally. You are able to open HTML files directly with the
browser because the browser understands HTML, Javascript and CSS natively.
Once you install a web server (like Apache), you will be able to view
your scripts at http://localhost/yourscript.php.
There are several prepackaged PHP/web server toolkits available. Take a
look at the listings at hotscripts.com for more information.
[EMAIL PROTECTED] wrote:
Hello,
i have a question about installing and making PHP work with window IE, i
installed the latest PHP application onto a WINDOW XP pro version OS. i am
not even sure i installed it right or not plus i don't know how to get
window IE to recognize the php extension after i made a small script in
php. the WINDOW IE won't read it.
i downloaded the 5 meg zip file and exploded and also i download the
installer. i am very stuck. should i get a book about php, i think i need
to and i hope the book will help on explaining better than the web site,
but i doubt that.
SIncerely,
christian
--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .
--- End Message ---
--- Begin Message ---
Hello,
I have some really big problems with php4.2.3& apache1.3.23 under win2000. It seems
that in a simple form like this:
<form action="new_date.php" method="post" >
<input type="text" name="name" >
<input type="Submit" name="submit" value="Enter information">
</form>
when new_date.php is called $name remains uninitialized. The error is:
[Fri Nov 01 14:30:37 2002] [error] [client 127.0.0.1] PHP Notice: Undefined variable:
death in e:\Apache\htdocs\test\new_date.php on line 13.
Also if I use $PHP_SELF in a similar form, I get :Undefined variable: PHP_SELF in
e:\Apache\htdocs\test\foo.html
I havetried to use php as cgi executabile or as module for apache but the errors are
the same. Under Linux everything works fine.
Thanks,
Adrian
--- End Message ---
--- Begin Message ---
register_globals, an option in the php.ini file has been denegrated and will
shortly no longer be supported in PHP. You can still turn it on (which
should fix your problem); but, in future releases you will need to use
variables such as $_POST['name'] to get your post variables. As a fix, at
the top of your document you can do something like:
$name = $_POST['name']; //to set the $name variable
OR
$name = $REQUEST['name'];
See: http://www.php.net/manual/en/language.variables.external.php
for more information.
---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Nullum magnum ingenium sine mixtura dementiae fuit
> -----Original Message-----
> From: Adrian Partenie [mailto:adrian.partenie@;artelecom.net]
> Sent: Friday, November 01, 2002 7:52 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] I could use some help
>
>
> Hello,
>
> I have some really big problems with php4.2.3& apache1.3.23
> under win2000. It seems that in a simple form like this:
>
> <form action="new_date.php" method="post" >
> <input type="text" name="name" >
> <input type="Submit" name="submit" value="Enter information">
> </form>
>
> when new_date.php is called $name remains uninitialized. The error is:
>
> [Fri Nov 01 14:30:37 2002] [error] [client 127.0.0.1] PHP
> Notice: Undefined variable: death in
> e:\Apache\htdocs\test\new_date.php on line 13.
>
> Also if I use $PHP_SELF in a similar form, I get :Undefined
> variable: PHP_SELF in e:\Apache\htdocs\test\foo.html
>
> I havetried to use php as cgi executabile or as module for
> apache but the errors are the same. Under Linux everything works fine.
>
> Thanks,
> Adrian
>
>
--- End Message ---
--- Begin Message ---
Is there a way to make a download start via a
script I have several downloads
and I'd like them to be download.php?id=0 etc, any
ideas
-DaMouse
![O]() Ensign Baker HCO
Officer USS Atlantis
|
--- End Message ---
--- Begin Message ---
I have a problem with a php script. Every time I run it small
(about 4 inches tall) green and pink illuminated goblins start
to run around at my desktop. I tried to bash them with a bat,
but it does not help they always comes back in numbers. My
colleges says I make to much noise and need a vacation.
Can I prevent this by setting some variables in php.ini?
Has anybody else experienced this kind of problem before?
--- End Message ---