Mysql Error Die
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might php die have Meta Discuss the workings and policies of this site About
Mysql Die Function
Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads mysql or die mysql_error with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million test php mysql programmers, just like you, helping each other. Join them; it only takes a minute: Sign up MySQL query shows die error in PHP up vote 1 down vote favorite The following is my test.php page which gets redirected from registration.php page. everything over here works very fine except sql query. All the alert tags show
Mysql Dead
session variable values perfectly well, but this page gives 'Error, insert query failed' error. Tried all possibilities like quotes to variables in query, etc., But nothing is working.. Please someone help.. "; echo "scriptalert('$comp')"; echo "scriptalert('$yr')"; echo "scriptalert('$no')"; echo "scriptalert('$addr')"; if($ser=='designing'){ $ser=1; }else if($ser=='webdev'){ $ser=2; }else{ $ser=3; } echo "scriptalert('$ser')"; $sql= "insert into login values ('$uname','xxxx',$ser,'$comp',$yr,'$addr','$per',$no,'$email')"; mysql_query($sql) or die('Error, insert query failed'); ?> Your Registration is successful...
Our team will contact you at the earliest... php mysql share|improve this question edited Jun 8 '12 at 15:09 Sanath 1,53152250 asked Jun 7 '12 at 10:56 mano 28126 6 Well, you might want to inspect the output of mysql_error().... Just a thought... –Wrikken Jun 7 '12 at 10:58 Can you show the output of echo $sql; and echo mysql_error();? –Mark Byers Jun 7 '12 at 10:58 3
and Objects Namespaces Errors Exceptions Generators References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Context options die(mysql_error()) and parameters Supported Protocols and Wrappers Security Introduction General considerations how to print mysql error in php Installed as CGI binary Installed as an Apache module Session Security Filesystem Security Database
Php Mysqli Error
Security Error Reporting Using Register Globals User Submitted Data Magic Quotes Hiding PHP Keeping Current Features HTTP authentication with PHP Cookies Sessions Dealing with http://stackoverflow.com/questions/10930415/mysql-query-shows-die-error-in-php XForms Handling file uploads Using remote files Connection handling Persistent Database Connections Safe Mode Command line usage Garbage Collection DTrace Dynamic Tracing Function Reference Affecting PHP's Behaviour Audio Formats Manipulation Authentication Services Command Line Specific Extensions Compression and Archive Extensions Credit Card Processing Cryptography Extensions Database Extensions http://php.net/manual/en/function.mysql-error.php Date and Time Related Extensions File System Related Extensions Human Language and Character Encoding Support Image Processing and Generation Mail Related Extensions Mathematical Extensions Non-Text MIME Output Process Control Extensions Other Basic Extensions Other Services Search Engine Extensions Server Specific Extensions Session Extensions Text Processing Variable and Type Related Extensions Web Services Windows Only Extensions XML Manipulation Keyboard Shortcuts? This help j Next menu item k Previous menu item g p Previous man page g n Next man page G Scroll to bottom g g Scroll to top g h Goto homepage g s Goto search(current page) / Focus search box mysql_escape_string » « mysql_errno PHP Manual Function Reference Database Extensions Vendor Specific Database Extensions MySQL MySQL (Original) MySQL Functions Change language: English Brazilian Portuguese Chinese (Simplified) French German Japanese Korean Romanian Russian Spanish Turkish Other Edit Report a Bug mysql_
Learn Bootstrap Learn Graphics Learn Icons Learn How To JavaScript Learn JavaScript Learn jQuery Learn jQueryMobile Learn http://www.w3schools.com/php/func_mysqli_error.asp AppML Learn AngularJS Learn JSON Learn AJAX Server Side Learn SQL Learn PHP Learn ASP Web Building Web Templates Web Statistics Web Certificates XML Learn XML Learn XML AJAX Learn XML DOM Learn XML DTD Learn XML Schema Learn XSLT Learn XPath Learn XQuery × HTML HTML Tag Reference HTML mysql error Event Reference HTML Color Reference HTML Attribute Reference HTML Canvas Reference HTML SVG Reference Google Maps Reference CSS CSS Reference CSS Selector Reference W3.CSS Reference Bootstrap Reference Icon Reference JavaScript JavaScript Reference HTML DOM Reference jQuery Reference jQuery Mobile Reference AngularJS Reference XML XML Reference XML Http Reference XSLT Reference XML mysql error die Schema Reference Charsets HTML Character Sets HTML ASCII HTML ANSI HTML Windows-1252 HTML ISO-8859-1 HTML Symbols HTML UTF-8 Server Side PHP Reference SQL Reference ASP Reference × HTML/CSS HTML Examples CSS Examples W3.CSS Examples Bootstrap Examples JavaScript JavaScript Examples HTML DOM Examples jQuery Examples jQuery Mobile Examples AngularJS Examples AJAX Examples XML XML Examples XSLT Examples XPath Examples XML Schema Examples SVG Examples Server Side PHP Examples ASP Examples Quizzes HTML Quiz CSS Quiz JavaScript Quiz Bootstrap Quiz jQuery Quiz PHP Quiz SQL Quiz XML Quiz × PHP Tutorial PHP HOME PHP Intro PHP Install PHP Syntax PHP Variables PHP Echo / Print PHP Data Types PHP Strings PHP Constants PHP Operators PHP If...Else...Elseif PHP Switch PHP While Loops PHP For Loops PHP Functions PHP Arrays PHP Sorting Arrays PHP Superglobals PHP Forms PHP Form Handling PHP Form Validation PHP Form Required PHP Form URL/E-mail PHP Form Complete PHP Advanced PHP