Search the Community
Showing results for tags 'error checking'.
-
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: <?php if (empty($_POST['isbn10'])) echo "<p>Please Fill in the input fields. Please use the back button to re-enter the data!</p>\n"; else { $ISBN10 = addslashes($_POST['isbn10']); echo "<p>Thank you for your input!</p>\n"; } //this are the code that should go in the project $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 set up the 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! //this are the code that should go in the project $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--> Can Someone show me how I am suppose to do the processing page for my ISBN 10 validation! Thank You!
- 2 replies
-
- php
- validation
-
(and 2 more)
Tagged with: