php - Unable to execute insert statement -


  अगर (सही) {// query $ insertAccount = mysqli_prepare ($ कनेक्शन, "खाते में प्रवेश करें (उपयोगकर्ता नाम, पासवर्ड, ईमेल), मूल्य (?,?,?) "); // बाइंड करें $ बाइंडः सफलता = mysqli_stmt_bind_param ($ डालें अकाउंट, 'एसएसएस', $ यूज़रनेम, $ पासवर्ड, $ ईमेल); अगर (mysqli_stmt_execute ($ insertAccount)) {हेडर ("स्थान: welcome.php"); } अन्य {हेडर ("स्थान: signup.php"); }}  

हैलो, मेरे पास PHP कोड से ऊपर कोड स्निपेट है, मुझे हमेशा signup.php पर निर्देशित किया जाता है, और कथन सम्मिलित नहीं है, मैं यहाँ क्या गलत कर रहा हूं? मैं PHP के लिए php और mysqli स्टेटमेंट्स के लिए बहुत नया हूँ।

अगर (सच) मेरे लिए सिर्फ यह साबित करने के लिए है कि ब्लॉक को क्रियान्वित किया गया है।

< Div class = "post-text" itemprop = "text">

mysqli_stmt_execute त्रुटि के मामले में गलत मान लौटाएं। आपको यह पुष्टि करनी चाहिए कि आपकी क्वेरी में कोई त्रुटि नहीं है:

  यदि (सत्य) {// query $ insertAccount = mysqli_prepare ($ कनेक्शन, "खाते में प्रवेश करें (उपयोगकर्ता नाम, पासवर्ड, ईमेल), मूल्य ") (,,??); // बाइंड करें $ बाइंडः सफलता = mysqli_stmt_bind_param ($ डालें अकाउंट, 'एसएसएस', $ यूज़रनेम, $ पासवर्ड, $ ईमेल); अगर (mysqli_stmt_execute ($ insertAccount)) {हेडर ("स्थान: welcome.php"); } Else {printf ("त्रुटि:% s। \ N", mysqli_stmt_error ($ insertAccount)); // हेडर ("स्थान: signup.php"); }}  

Comments

Popular posts from this blog

HTML/CSS - Automatically set height width from background image? -

php - Mysql Show Process - Sleep Commands and what to do -

c - What is the address of buf (the local variable in the main function)? -