0

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 the 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!

$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

Can Someone show me how I am suppose to do the processing pagefor my ISBN 10 validation!
Thank You!

1
Contributor
1
Reply
13
Views
3 Years
Discussion Span
Last Post by ray100
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.