Support Forums
Employee Management Script - Printable Version

+- Support Forums (https://www.supportforums.net)
+-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87)
+--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18)
+---- Forum: PHP The Hypertext Preprocessor (https://www.supportforums.net/forumdisplay.php?fid=21)
+---- Thread: Employee Management Script (/showthread.php?tid=3823)



Employee Management Script - nevets04 - 12-21-2009

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


RE: Employee Management Script - Gaijin - 12-21-2009

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..


RE: Employee Management Script - nevets04 - 12-21-2009

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.


RE: Employee Management Script - Gaijin - 12-21-2009

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!