View Single Post
Old 04-12-07, 08:41 AM   #2
radekhulan
 
radekhulan's Avatar
 
Join Date: Apr 2005
Location: Prague
Posts: 749
Default Re: Urgent help needed with PHP

mysql_num_rows is a function, and should be called with resource parameter, in your case mysql_num_rows($query). There may be more bugs, but this one was standing out

There is also a security bug with not escaping $_POST data used in MySQL query, which can lead to XSS.

In your HTML, you have two "password" inputs with the same name (wrong!), and there is name="E-mail id" input, while in PHP you refer to $_POST ['email'], not "E-mail id".

Frankly, you should get back to school and learn basics, you code is something utterly horrible..
__________________
[size=1][b]CPU:[/b] Core 2 Quad Q6600 @ 3.2GHz | [b]Memory:[/b] 4x2GB Patriot DDR2-800 | 4GB A-Data PD7 ReadyBoost USB | [b]Sound:[/b] X-Fi FPS
[b]Board:[/b] Asus Commando | [b]GPU: 8800GTX @ 650/1050[/b] | [b]HDD:[/b] 3x WD3200KS 320GB + 500GB | [b]Power:[/b] Fortron EPSILON 600W-GLN
[b]Mouse:[/b] Logitech G5 | [b]Kbd:[/b] Logitech G15 | [b]DVD:[/b] Plextor 130B + LITE-ON LH-18A1H | [b]LCD[/b] [b]24" HP2465 1920x1200[/b] | Vista Ultimate x64
My websites: [url=http://hulan.cz/en][b]HULAN.cz[/b][/url], [url=http://radekhulan.cz/][b]RADEKHULAN.cz[/b][/url], [url=http://hulan.info/][b]HULAN.info[/b][/url], [url=http://blogcms.com/][b]BLOGCMS.com[/b][/url], [url=http://www.megablog.cz/][b]MEGABLOG.cz[/b][/url] | [url=http://hulan.cz/temp/games.png][b]Games played[/b][/url] | [URL=http://hulan.cz/temp/sestava.png][B]CPU-Z[/B][/URL] -- [URL="http://radekhulan.cz/img/stacker-830/stacker-830-bocnice.jpg"][B]case foto[/B][/URL][/size]
radekhulan is offline   Reply With Quote