Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

server has problems with php self
Is there any other way to reload a page apart from PHP_SELF ? as my server
seems to refuse to have anything to do with it at all!
I know this is a bit of a newbie question but so far I'm running up against
a massive brick wall with a file upload script I am working on.
thanks in advance.

Wayne...



Report this thread to moderator Post Follow-up to this message
Old Post
Wayne...
12-24-04 09:00 AM


Re: server has problems with php self
Wayne... wrote:
> Is there any other way to reload a page apart from PHP_SELF ? as my server
> seems to refuse to have anything to do with it at all!
> I know this is a bit of a newbie question but so far I'm running up agains
t
> a massive brick wall with a file upload script I am working on.
> thanks in advance.
>
> Wayne...
>
>


You didn't mention how you're currently going about it, so I'm assuming
you're having a form submitting to itself, and the simple answer would
be, just leave the form action empty; by default it submits to itself.

eg:

#test.php

<form method=post action="">
<input type="hidden" name="f_hidden" value="voila!">
<input type="submit">
</form>

<?php

echo $_POST["f_hidden"];

?>

Hope that helps,

Anthony.

Report this thread to moderator Post Follow-up to this message
Old Post
Anthony Plunkett
12-24-04 09:00 AM


Re: server has problems with php self
> You didn't mention how you're currently going about it, so I'm assuming you're having a f
orm submitting to itself, and the simple
> answer would be, just leave the form action empty; by default it submits to itself
.

This solution was allready discussed on this group, but I'll remind the fact
s:
"action" attribute in "form" tag is required and when it's missing, then
the browser decides how to inteprete it (some will not treat it as a valid
form, some will, but still they may respond differently).

Hilarion



Report this thread to moderator Post Follow-up to this message
Old Post
Hilarion
12-27-04 08:55 PM


Re: server has problems with php self
> Is there any other way to reload a page apart from PHP_SELF ? as my server
> seems to refuse to have anything to do with it at all!

How do you use PHP_SELF? How does the server "refuse to have anything to do
with it"?

You might want to take a look at:

related predefined constant:
__FILE__

related predefined variables:
$_SERVER['PHP_SELF'] - this differs from __FILE__ !! (try in included files)
$_SERVER['DOCUMENT_ROOT']
$_SERVER['SCRIPT_FILENAME']
$_SERVER['PATH_TRANSLATED']
$_SERVER['SCRIPT_NAME']


Hilarion



Report this thread to moderator Post Follow-up to this message
Old Post
Hilarion
12-27-04 08:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Language archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 08:24 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.