html form action

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
mickd
Forum Contributor
Posts: 397
Joined: Tue Jun 21, 2005 9:05 am
Location: Australia

html form action

Post by mickd »

hi, is it just me or when you have a html form for example
<form action="actionhere" method="post">
it doesnt work if actionhere has ../ at the front. to me it looks like all ../ are ignored.

am i doing something wrong as i need to let the form access a file that is outside the public_html folder.

thanks, any help appriciated.
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

As far as I remember folders and files outside public_html (CPanel way) are not accessible from outside - they can only be accessed from within the Server using Server side scripts.

Your form is trying to post some data that lies outside the public_html directory which is the root directory for the domain.
mickd
Forum Contributor
Posts: 397
Joined: Tue Jun 21, 2005 9:05 am
Location: Australia

Post by mickd »

hi, thanks for the reply.

i noticed <a href="../blah"> doesnt work too.

what type of server side scripts would i need?
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

PHP, ASP, Perl, CFM - anything that your host supports.
But even then you wouldnt be able to anything on your HTML part that accessess the files outside public_html - you can just include them like include_once("../somescript.php") which will be processed internally.

For your tag purposes you'll need to keep them all inside public_html.
Post Reply