Support Forums

Full Version: Employee Management Script
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This is my second program. It's based off one of my python scripts. Basically, it takes input from the user and calculate an employees salary. I uploaded the files, just because I was too lazy to paste them all in, and maybe some of you would have been to lazy to paste them all out. Like I said this is my second program, so feedback is appreciated

DOWNLOAD:
http://www.mediafire.com/?znhxe2ejnne
Didn't work, addadd.php has a error in the line 10

Fixed code:
PHP Code:
<?php
$salary
=$_GET["wage"]*$_GET["hours"]*$_GET["days"];
$rname=$_GET["fname"];
$file=fopen("test.txt","a");
fwrite($file,$rname);
fwrite($file,": ");
fwrite($file,$salary);
fwrite($file,"<br>");
fclose($file);

echo <<<HTML

<script type="text/javascript">
<!--
window.location = "http://localhost/home.php"
//-->
</script>

HTML;

?>

every string that should be printed on the screen inside of <?php and ?> must be done with print or echo...
Also you may want to remove http://localhost/ from your a tags and header function..
Thanks. Re uploaded with the fix. I thought I tested this before I upload it the first time, I guess I was wrong Big Grin. http://www.mediafire.com/?huudj2imxow
Master of the universe, how many programming languages do you know, I see you all over the coding section.
Coding is my life!
You can see the coding languages I written atleast one finished code with on my Profile....
There are few that are not in the list...
Action Script, JavaScript(Ajax (bit) ) and Basic on Commodore128, I also was learning ruby but droped that.
But PHP is the where my Place is Big Grin

And no problem, here to support Tongue

edit:
Now you did a good job, I know your script for Python and this is also good one!