Hi,
I am a beginner at programing and I have to do this project where it is asking me to valid ISBN 10 and 13 using MySQL database to store the information. I checked my php code to validate ISBN 10 and 13 and it works, but when I try to store the data to MySQL it is not working. What I mean is that when I click ShowISBN link it doesn't show this information:

Please go to this site to check my code because when I post my code here Iget the following message:

The code snippet in your post is formatted incorrectly. Please use the Code button in the editor toolbar when posting whitespace-sensitive text or curly braces.

Go to :

http://forums.phpfreaks.com/topic/288585-need-help-with-a-php-program-using-mysql/

Any help will be appreciate it!

Recommended Answers

All 2 Replies

Member Avatar for iamthwee

Why do you have an @ infront of your mysql?

He is using it to suppress errors.

I agree with the posters on the other site, you have a lot of wonkey going on. Im not sure why you are allowing users to dynamically allocate tables, let alone entire databases. But, meh, to each their own. Im sure you have your reasons.

What stands out to me on the area marked "this is where it breaks" is you do not properly quote your variable in the SQL syntax.

$SQLstring = "SELECT * FROM $TableName";

Everywhere else you wrap $Foo as '$Foo' but here you did not.

Not sure if that's your problem, but it is a start.

I would encourage you to rethink your plan of attack here, unless you know you can trust the source of the incoming data - and even then, it's a bit hokey. You don't sanitize anything... you have a lot to work on to make this a working bit of code, I feel...

Good luck!!

Ryan

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.