Answering within the email below
d
On 4-Dec-04, at 3:16 AM, [EMAIL PROTECTED] wrote:
From: Jason Wong <[EMAIL PROTECTED]>
Date: December 4, 2004 12:04:18 AM PST
To: [EMAIL PROTECTED]
Subject: Re: [PHP] variable not being rendered
On Saturday 04 December 2004 15:36, Dustin Krysak wrote:
Hi there, I have some code where I am using the $_SERVER['PHP_SELF']
array to reference my script for a form action... now for some reason
the file name is not being rendered out. I am including only small
snippets of my code to see where my error is...
I know this is not your actual code, but did you actually run this? I
can't
see any errors in it and it should work fine if you're using a recent
version
of PHP.
I did run it... that is the reason I posted. As I stated, When I view
source, the result is blank.
$editFormAction = $_SERVER['PHP_SELF'];
What does print_r($_SERVER) show?
What does print $editFormAction show?
echo $_SERVER['PHP_SELF']; shows the proper result.
print_r($_SERVER['PHP_SELF']); shows the proper result
print $editFormAction ; shows the proper result
print "\n";
As you're not placing variables inside your print statement you might
as well
use single-quotes:
print ''."\n";
This does away with all the backslashes (which gives me a headache).
Well I changed it to:
print ''."\n";
and I still had the same result. the source of the page when viewed in
the browser was:
So as you can see the "$editFormAction" is still not being rendered. So
I am going to add the following info, I have a page that is required
once that contains my functions. and I defined a function to print out
this form. My code for that is:
// create subscribe form
function sub_form() {
print ''."\n";
print ''."\n";
print ''."\n";
print '';
}
?>
So would my issue be that I formatted my function wrong? Or that the
page is included?
Dustin
--
Jason Wong -> Gremlins Associates
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php