Create table not working

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nilanjan001
    New Member
    • May 2012
    • 3

    Create table not working

    Dear Experts,

    I am using XAMPP to work with PHP-MySQL.I want to create a table in a database(say 'db1') using only PHP code. I am using the following syntax but it is not working. But the database is connected successfully. Please guide me...

    mysql_query("CR EATE TABLE tb1(uname varchar2(5),uid varchar2(10),pa ssword varchar2(10))") ;
  • Luuk
    Recognized Expert Top Contributor
    • Mar 2012
    • 1043

    #2
    Change varchar2 to varchar

    see docs

    Comment

    • Nilanjan001
      New Member
      • May 2012
      • 3

      #3
      Thank you Luuk. It worked successfully. I have another question. How can I send data from a form using GET or POST method but not using 'form action' property? If there are two or more buttons in that form then what is the way to redirect into two or more different php pages in response of each button?

      Comment

      • Luuk
        Recognized Expert Top Contributor
        • Mar 2012
        • 1043

        #4
        it would be against policy to just give you the link to the correct answer,
        Also it's not smat to ask a totally different question in this thread, you should start a new thread if you have a new question ;)

        But the answer is learn to Google, or click here

        Comment

        Working...