miqyk Posted August 29, 2007 Share Posted August 29, 2007 i'm a newbe in php, i've made this project but i can't seem to get the update/edit function, and i have managed to generate a pdf report but its not arranged in a neet format showing 2 pictures. need help to improve on these. [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/67217-improve/ Share on other sites More sharing options...
phpSensei Posted August 29, 2007 Share Posted August 29, 2007 Wrong section, or no link.... Quote Link to comment https://forums.phpfreaks.com/topic/67217-improve/#findComment-337230 Share on other sites More sharing options...
miqyk Posted September 6, 2007 Author Share Posted September 6, 2007 i have attached the code. download the military.zip file. start by running index1.php thanx. Quote Link to comment https://forums.phpfreaks.com/topic/67217-improve/#findComment-343073 Share on other sites More sharing options...
phpSensei Posted September 6, 2007 Share Posted September 6, 2007 oh sorry, will check it out when done. Quote Link to comment https://forums.phpfreaks.com/topic/67217-improve/#findComment-343293 Share on other sites More sharing options...
phpSensei Posted September 6, 2007 Share Posted September 6, 2007 alright um... A little question. Whats the point of this site, and how does this application help people? Quote Link to comment https://forums.phpfreaks.com/topic/67217-improve/#findComment-343297 Share on other sites More sharing options...
phpSensei Posted September 6, 2007 Share Posted September 6, 2007 You need to validate the form -Check if the information entered is correct (e.g. " Weight and Height must be in this form { 5 ' 10 } ) -Check the file sizes -Check if fields are empty -Check if the string is too long, or too short -Validate the email format -Prevent floods -Validate the bank details ...etc - Sql injections - Strip html tags... <?php include "config.php"; $uploaddir = 'photo/'; $uploaddir1 = 'fullphoto/'; $uploadfile = $uploaddir . basename($_FILES['userfile']['name']); $uploadfile1 = $uploaddir1 . basename($_FILES['userfile1']['name']); if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) { echo "File is valid, and was successfully uploaded.\n"; } if (move_uploaded_file($_FILES['userfile1']['tmp_name'], $uploadfile1)) { echo "File is valid, and was successfully uploaded.\n"; } $strresult=$_POST{"result"}; $strname=$_POST{"name"}; $strdate=$_POST{"date"}; $stridno=$_POST{"idno"}; $ppphoto= basename($_FILES['userfile']['name']); //gets the base name $flphoto= basename($_FILES['userfile1']['name']); //gets the base name $strgender=$_POST{"gender"}; $strmarital=$_POST{"marital"}; $strage=$_POST{"age"}; $straddress=$_POST{"address"}; $strtelno=$_POST{"telno"}; $stremail=$_POST{"email"}; $strppno=$_POST{"ppno"}; $strreligion=$_POST{"religion"}; $strarea=$_POST{"area"}; $strbranch=$_POST{"branch"}; $stryears=$_POST{"years"}; $strrank=$_POST{"rank"}; $strdischarge=$_POST{"discharge"}; $strcurrent=$_POST{"current"}; $stracademic=$_POST{"academic"}; $strcertification=$_POST{"certification"}; $strskill=$_POST{"skill"}; $strlevel=$_POST{"level"}; $strdl=$_POST{"dl"}; $strservice=$_POST{"service"}; $strheight=$_POST{"height"}; $strweight=$_POST{"weight"}; $strtumors=$_POST{"tumors"}; $strmigraine=$_POST{"migraine"}; $strmental=$_POST{"mental"}; $streye=$_POST{"eye"}; $strasthma=$_POST{"asthma"}; $strarterial=$_POST{"arterial"}; $strliver=$_POST{"liver"}; $strdiabetis=$_POST{"diabetis"}; $strurinary=$_POST{"urinary"}; $strbones=$_POST{"bones"}; $strback=$_POST{"back"}; $strskin=$_POST{"skin"}; $strpregnancy=$_POST{"pregnancy"}; $strhiv=$_POST{"hiv"}; $strprescription=$_POST{"prescription"}; $strregular=$_POST{"regular"}; $strppvalid=$_POST{"ppvalid"}; $bankname=$_POST["bankname"]; $bankbranch=$_POST["bankbranch"]; $beneficiary=$_POST["beneficiary"]; $swiftcode=$_POST["swiftcode"]; $accountnumber=$_POST["accountnumber"]; $strnokname=$_POST["nokname"]; $strnokrel=$_POST["nokrel"]; $strnoktel=$_POST["noktel"]; $strnokadd=$_POST["nokadd"]; $query = "INSERT INTO info(id,name,dob,idno,marital,gender,age,ppno,ppvalid,religion,address,telno,email,nokname,nokrel,noktel,nokadd,branch,years,area,discharge,service,rank,current,academic,certification,skills,dl,level,height,weight,tumors,migraine,mental,eye,asthma,arterial,liver,diabetis,urinary,bones,back,skin,pregnancy,hiv,prescription,regular,result,passportphoto,fulllengthphoto,bankname,bankbranch,beneficiary,swiftcode,accountnumber) VALUES('','$strname','$strdate','$stridno','$strmarital','$strgender','$strage','$strppno','$strppvalid','$strreligion','$straddress','$strtelno','$stremail','$strnokname','$strnokrel','$strnoktel','$strnokadd','$strbranch','$stryears','$strarea','$strdischarge','$strservice','$strrank','$strcurrent','$stracademic','$strcertification','$strskill','$strdl','$strlevel','$strheight','$strweight','$strtumors','$strmigraine','$strmental','$streye','$strasthma','$strarterial','$strliver','$strdiabetis','$strurinary','$strbones','$strback','$strskin','$strpregnancy','$strhiv','$strprescription','$strregular','','$ppphoto','$flphoto','$bankname','$bankbranch','$beneficiary','$swiftcode','$accountnumber')"; // execute query $result = mysql_query($query) or die ("Error in query: $query. " . mysql_error()); ?> <a href="deploy.php">Depolyment Packet</a> Quote Link to comment https://forums.phpfreaks.com/topic/67217-improve/#findComment-343299 Share on other sites More sharing options...
miqyk Posted September 11, 2007 Author Share Posted September 11, 2007 it should be included in a website to collect information on people being recruited for jobs. Quote Link to comment https://forums.phpfreaks.com/topic/67217-improve/#findComment-346061 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.