Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Can't get my 2nd table working

Can't get my 2nd table working

Scheduled Pinned Locked Moved Database
phpdatabase
16 Posts 3 Posters 8 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Lost User

    Very interesting. Now do you have some useful information that would help people to figure out what you are referring to?

    P Offline
    P Offline
    piano0011
    wrote on last edited by
    #4

    Appreciate the prompt reply. .. i am not on my pc now because it is very late but will post the code tomorrow and thanks for your patience as i am a newbie at php

    1 Reply Last reply
    0
    • L Lost User

      There will be a line of code that contains the words "INSERT INTO" and the name of the table. Find it, paste code here.

      Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^] "If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.

      P Offline
      P Offline
      piano0011
      wrote on last edited by
      #5

      Hi! I have sent a reply but it is currently under review but that was to another person. Do I need to reply to your message or will you be able to see it?

      P 1 Reply Last reply
      0
      • P piano0011

        Hi! I have sent a reply but it is currently under review but that was to another person. Do I need to reply to your message or will you be able to see it?

        P Offline
        P Offline
        piano0011
        wrote on last edited by
        #6

        That is strange... I wonder why this is not under review? How long does a review take?

        1 Reply Last reply
        0
        • L Lost User

          Very interesting. Now do you have some useful information that would help people to figure out what you are referring to?

          P Offline
          P Offline
          piano0011
          wrote on last edited by
          #7

          I have replied but apparently, it is under review, how long does a review take? Should I post it again here?

          OriginalGriffO 1 Reply Last reply
          0
          • L Lost User

            Very interesting. Now do you have some useful information that would help people to figure out what you are referring to?

            P Offline
            P Offline
            piano0011
            wrote on last edited by
            #8

            I posted it a few minutes ago but perhaps I forgot to include the pretags and that is why it is under reviewed.. I will repost it again and hope that it gets through faster, apologies for posting it again but here is my html form in signup.php

            Signup

                 Firstname
                   
            
                 
                 Lastname
                   
            
                 
                 E-Mail
                   
            
                 
                 Username
                   
            
                 
                 Password
                   
            
                 
                 Basic Subscription Plan
                   
            
                 Primer Level: Free
                 
                   
            
                  Premium Subscription Plan 1
                    
            
                 Choose Subscription Plan 1
                    None
                    Level 1
                    Level 2
                    Level 3
                 
                   
            
                 
                 Sign up
              
            
              ";
                       echo "
            

            You did not fill in all fields!

            ";
            }
            elseif (strpos($fullUrl, "signup=invalid") == true) {
            echo "
            ";
            echo "

            Your first name and last name have invalid characters!

            ";
            }
            elseif (strpos($fullUrl, "signup=email") == true) {
            echo "
            ";

            1 Reply Last reply
            0
            • L Lost User

              Very interesting. Now do you have some useful information that would help people to figure out what you are referring to?

              P Offline
              P Offline
              piano0011
              wrote on last edited by
              #9

              I have been trying to do a multiple select option in my html form, so I will include that file here as well.... Someone else also replied to my question, do I need to post it back to him or her? I think i will post it just in case but here are my html and php code... From my experience, when this type of problem happened, it is usually the problem of my sql variables. Also, I am trying to use implode and did something like $subscriptionplan = implode(',', $subscriptionplan); in order to insert the following into a single column: Level 1, Level 2, Level 3... Can you also check my signup2.php page and let me know if I did do the if statements correctly as I have been following mmtuts on youtube but shouldn't it be elseif()? // Code for html

              Signup

                   Firstname
                     
              
                   
                   Lastname
                     
              
                   
                   E-Mail
                     
              
                   
                   Username
                     
              
                   
                   Password
                     
              
                   
                   Basic Subscription Plan
                     
              
                   Primer Level: Free
                   
                     
              
                    Premium Subscription Plan 1
                      
              
                   Choose Subscription Plan 1
                      None
                      Level 1
                      Level 2
                      Level 3
                   
                     
              
                   
                   Sign up
              
              L 1 Reply Last reply
              0
              • P piano0011

                I have replied but apparently, it is under review, how long does a review take? Should I post it again here?

                OriginalGriffO Offline
                OriginalGriffO Offline
                OriginalGriff
                wrote on last edited by
                #10

                It depends, and no. I deleted the spare, but reposting what didn't work last time doesn't help - reviewing takes as long as it takes for a human volunteer to notice it (and on a Sunday morning that may take a short time) and check it carefully to see if the automated system is right or wrong. Have a little patience, please - you would not believe the amount of spam we get from time to time ... Just reposting the same stuff will make the automated system more convinced you are a nasty spammy person, not less, and will probably decrease your chances of getting messages through in future.

                Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

                "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                P 1 Reply Last reply
                0
                • OriginalGriffO OriginalGriff

                  It depends, and no. I deleted the spare, but reposting what didn't work last time doesn't help - reviewing takes as long as it takes for a human volunteer to notice it (and on a Sunday morning that may take a short time) and check it carefully to see if the automated system is right or wrong. Have a little patience, please - you would not believe the amount of spam we get from time to time ... Just reposting the same stuff will make the automated system more convinced you are a nasty spammy person, not less, and will probably decrease your chances of getting messages through in future.

                  Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

                  P Offline
                  P Offline
                  piano0011
                  wrote on last edited by
                  #11

                  My apologies and thanks!

                  OriginalGriffO 1 Reply Last reply
                  0
                  • P piano0011

                    My apologies and thanks!

                    OriginalGriffO Offline
                    OriginalGriffO Offline
                    OriginalGriff
                    wrote on last edited by
                    #12

                    :laugh: You're welcome!

                    Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

                    "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                    "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                    1 Reply Last reply
                    0
                    • P piano0011

                      I have been trying to do a multiple select option in my html form, so I will include that file here as well.... Someone else also replied to my question, do I need to post it back to him or her? I think i will post it just in case but here are my html and php code... From my experience, when this type of problem happened, it is usually the problem of my sql variables. Also, I am trying to use implode and did something like $subscriptionplan = implode(',', $subscriptionplan); in order to insert the following into a single column: Level 1, Level 2, Level 3... Can you also check my signup2.php page and let me know if I did do the if statements correctly as I have been following mmtuts on youtube but shouldn't it be elseif()? // Code for html

                      Signup

                           Firstname
                             
                      
                           
                           Lastname
                             
                      
                           
                           E-Mail
                             
                      
                           
                           Username
                             
                      
                           
                           Password
                             
                      
                           
                           Basic Subscription Plan
                             
                      
                           Primer Level: Free
                           
                             
                      
                            Premium Subscription Plan 1
                              
                      
                           Choose Subscription Plan 1
                              None
                              Level 1
                              Level 2
                              Level 3
                           
                             
                      
                           
                           Sign up
                      
                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #13

                      I thought you had a Database question. Please edit that response and explain exactly what the problem is and where it occurs.

                      P 2 Replies Last reply
                      0
                      • L Lost User

                        I thought you had a Database question. Please edit that response and explain exactly what the problem is and where it occurs.

                        P Offline
                        P Offline
                        piano0011
                        wrote on last edited by
                        #14

                        I am not sure if it is a database or php problem but for some reason, it is not inserting information into my memberships table... The users information is correct, so that is why I posted the php code

                        L 1 Reply Last reply
                        0
                        • P piano0011

                          I am not sure if it is a database or php problem but for some reason, it is not inserting information into my memberships table... The users information is correct, so that is why I posted the php code

                          L Offline
                          L Offline
                          Lost User
                          wrote on last edited by
                          #15

                          I suggest you read https://www.codeproject.com/Messages/1278600/How-to-get-an-answer-to-your-question.aspx[^]. You are expected to do the basic debugging, at least to identify where the problem occurs. Remember, we have never seen this code before, we do not have your database or whatever inputs you are using to test it. BTW I received fifteen (!) copies of the above reply from you.

                          1 Reply Last reply
                          0
                          • L Lost User

                            I thought you had a Database question. Please edit that response and explain exactly what the problem is and where it occurs.

                            P Offline
                            P Offline
                            piano0011
                            wrote on last edited by
                            #16

                            I am confused here because I thought it was a database question... well, it is a php and database question but there is no php section and I also am not sure how to copy and paste the sniptool because it shows that the information is not inserted into the database table but when using the query from the database, it does work... I have checked my sql query and I have got all the variables correct but am also including a multiple select option, where I have included name="subscription[]". Is this question clearer?

                            1 Reply Last reply
                            0
                            Reply
                            • Reply as topic
                            Log in to reply
                            • Oldest to Newest
                            • Newest to Oldest
                            • Most Votes


                            • Login

                            • Don't have an account? Register

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • World
                            • Users
                            • Groups