This is the project I need to finish. I am fairly new to php and this project has got me confused. Any help would be greatly appreciated
The project ask for to validate ISBN 10 Number. There would be 10 digits with 1-9 being Numbers, but Number 10 is an x.
This is What I have so far:
This is the input page or html page:
<form method="POST" action="Process10ISBN.php">
<p>Enter ISBN 10: <input type="text" name="isbn10"
/></p>
<input type="submit" name="Submit" value="Submit" />
</form>
This is what I have so far for the Procssing page to validate ISBN 10:
if (empty($_POST['isbn10']))
echo "<p>Please Fill in the input fields!</p>\n";
else {
$ISBN10 = addslashes($_POST['isbn10']);
echo "<p>Thank you for your input!</p>\n";
}
$chk_sum_num=10;
for($i=0;$i<=9;$i++
{
$chk_sum+=$ISBN_Arr[$i] * $chk_sum_num;
print"$ISBN_Arr[$i] | $chk_sum_num<br/>";
$chk_sum_num--;
}//end for loop
//this goes at top, then the loop goes inside it
If $ISBNARR[9]!=is numeric{{!= 'X'!!='x'
print"Not ISBN 10 Number<br/>";
Else If $ISBNARR[9]=='x' or "X" $ISBNARR[9] = 10
?><!--End PHP Script-->
I don't know how to organize my processing page. All I know is that this code has to be included in the processing page: I know my processing code is set up wrong. I couldn't figure out how I would put the codes in and what else I needed to add! Can someone take few minutes and tell me how do I set up my processing page.