E-Commerce Website using PHP and MySQL || Inserting Categories || Part -10

Поделиться
HTML-код
  • Опубликовано: 26 янв 2025

Комментарии • 98

  • @KhanamCoding
    @KhanamCoding  2 года назад

    🚀Get access to full PHP CRUD project.
    www.udemy.com/course/learn-php-crud-operation-create-read-update-and-delete/?referralCode=4C91E67AB34784662E54
    🚀Registration system using PHP and MySQL
    www.udemy.com/course/registration-and-login-system-using-php-and-mysql/?referralCode=F96D572ED43994DAD56F
    *******************************
    👉Instagram: @khaiserkhanam
    instagram.com/khaiserkhanam/

  • @jimmyjr.laranjo250
    @jimmyjr.laranjo250 2 года назад +42

    for anyone having this error
    Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''categories' (category_title) values ('qwe')' at line 1 in E:\XAMPP\htdocs\finale\admin_area\insert_categories.php:6 Stack trace: #0 E:\XAMPP\htdocs\finale\admin_area\insert_categories.php(6): mysqli_query(Object(mysqli), 'insert into 'ca...') #1 E:\XAMPP\htdocs\finale\admin_area\index.php(69): include('E:\\XAMPP\\htdocs...') #2 {main} thrown in E:\XAMPP\htdocs\finale\admin_area\insert_categories.php on line 6
    Solution: remove the ' ' on categories in your line $insert_query

  • @Khal_Rheg0
    @Khal_Rheg0 Год назад +5

    Remove the single quotes around the table name 'categories' in the insert query. Table names should be surrounded by backticks (`) instead of single quotes. This is a common mistake when writing SQL queries.

  • @khaledmetwaly8165
    @khaledmetwaly8165 2 года назад +1

    You Are Top .. Go On ..

  • @rutujarathi1206
    @rutujarathi1206 2 года назад +5

    Don't get items inserted successfully in database what to do then

  • @AJKYOUTHCLUB
    @AJKYOUTHCLUB 6 месяцев назад +1

    Jazak Allah ❤❤ love you From MIU university 🎉

  • @anjaligiri3882
    @anjaligiri3882 2 года назад +5

    Can you plzz help ma'am 🙏
    I am getting error in insert category.
    I checked the code properly but unable to do action.

    • @devgupta3776
      @devgupta3776 10 месяцев назад

      Same buddy

    • @Davil-t7b
      @Davil-t7b 4 месяца назад

      use backtiks instead of single quotes for table name `categories` instead of 'categories'

  • @urvimaheshwari1982
    @urvimaheshwari1982 11 месяцев назад

    Mam will click on insert categories button alert message was not display and data was not added so please help me

    • @urvimaheshwari1982
      @urvimaheshwari1982 11 месяцев назад

      mam plz reply

    • @clearjhonbryl
      @clearjhonbryl 11 месяцев назад

      make sure that your includes folder are seperate folder and not part of the admin folder

  • @adparikhyt8859
    @adparikhyt8859 Год назад

    11:25 i am getting this error
    Fatal error: Uncaught TypeError: mysqli_num_rows(): Argument #1 ($result) must be of type mysqli_result, bool given in C:\xampp\htdocs\website\admin\insert_categories.php:11 Stack trace: #0 C:\xampp\htdocs\website\admin\insert_categories.php(11): mysqli_num_rows(false) #1 C:\xampp\htdocs\website\admin\index.php(78): include('C:\\xampp\\htdocs...') #2 {main} thrown in C:\xampp\htdocs\website\admin\insert_categories.php on line 11

  • @havipradipkumarpatel5764
    @havipradipkumarpatel5764 2 года назад +3

    Hi, I'm having the same problem as others. I don't get the items inserted successfully alert and it is not adding to my database. I checked all the codes and everything. Can you please help?

  • @mustansirghor7585
    @mustansirghor7585 Год назад

    For the tag in the connect.php fle and when I save the file in VS code the ?> gets removed. Is that an error?

  • @techgeek3325
    @techgeek3325 2 года назад

    9:36 - You can also write mysqli_num_rows like below:
    if(mysqli_num_rows($result_select) > 0){
    echo 'do this';
    else{
    echo 'do this';
    }
    }

  • @k1229_status
    @k1229_status Год назад

    Please help mem ( syntax error, unexpected token "if" in) error not insert the value please solve my error

  • @nooralamkhan3180
    @nooralamkhan3180 2 года назад +1

    Please maam complete the project
    Please upload remaining videos🙏🏻

  • @arafobscure9253
    @arafobscure9253 2 года назад +1

    i face some problem how can i fix it
    Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''categories ( 'categories_id','categories_title' ) values ('1','Cloth')' at line 1.

    • @danyalsamad1080
      @danyalsamad1080 2 года назад +6

      Table names should be surrounded by backticks, if they need to be quoted at all. Using single quotes will turn it into a value and break your query.
      So replace 'categories' by `categories`

    • @thenoiseinspace
      @thenoiseinspace 2 года назад

      @@danyalsamad1080 Thank you! I had the same issue and that fixed it!

    • @captainalexyoj
      @captainalexyoj 2 года назад

      @@danyalsamad1080 Dude thank you so much for this it really helps me a lot

    • @debashritasaha9518
      @debashritasaha9518 2 года назад +1

      Thank you so much it's working now😌

    • @k.keerthanabca5125
      @k.keerthanabca5125 Год назад

      @@danyalsamad1080 thankyou so much

  • @fazilashahid1535
    @fazilashahid1535 8 месяцев назад

    data show ni ho rha database me emply column a rha ha category ka ise kase solve karen

  • @sanataissick
    @sanataissick 2 года назад

    Thank you for a great tutorial. I have a small problem though. Whenever I refresh the page, the form will be resubmitted which is not intended behavior. Is there a solution to my problem or have I done something differently?

  • @tipusutanalikhan4824
    @tipusutanalikhan4824 Год назад

    How will we get the source code of the e-commerce website that we have created?

  • @sanurin1234
    @sanurin1234 Год назад

    They keep saying that no such folder is included but I have a folder. I am unable to connect with my database

  • @dwikisatria3692
    @dwikisatria3692 2 года назад +1

    In insert category when I'm typing Fruit and Vegetable nothing is happening and in my database phpmyadmin. I have written the code follow your tutorial and same but can't work

  • @animedraw8907
    @animedraw8907 Год назад

    If you want, you can do this : alert('Category $category_title has been inserted successfully')"; We add just $category_title It's for display the name of the catergorie

    • @brianmutati3081
      @brianmutati3081 Год назад

      Still doesn't work...am having the same problem where the category is added to the database but the name of the category is not displayed.

  • @vishwaiitbhikale4196
    @vishwaiitbhikale4196 Год назад

    Same problem alert message is not displaying

  • @ferdous8498
    @ferdous8498 2 года назад

    All syntax ok but did not working .

    • @deepankar35
      @deepankar35 2 года назад +3

      $result = "INSERT INTO categories (category_title) VALUES ('$insert_category')"; try this

    • @riddhikohli1775
      @riddhikohli1775 2 года назад

      Hi can u pls help with code

  • @swalehaparveenmomin1092
    @swalehaparveenmomin1092 2 года назад +1

    Could you please help ma'am 🙏
    I am getting below error in insert category.
    I checked the code properly but unable to do action.
    Error visible on the front-end:
    0){ echo ""; }else{ $insert_query="insert into 'categories' (category_title) valuse ('$category_title')"; $result=mysqli_query($con,$insert_query); if($result){ echo ""; } } } ?>

    • @Afkerhussaindeen
      @Afkerhussaindeen Год назад +1

      I have also stuck into this problem for a while but actually it's a mistake I did in the insert_query. which is I typed the categorise as 'categories' but it's not single qoute. it's the key just above the tab key in the keyboard. so it will be `categories` not 'categories'. looks like that will fix your issue as well.😇

  • @islamicvideoschannel8425
    @islamicvideoschannel8425 Год назад

    Fatal error: Uncaught mysqli_sql_exception: Table 'my store.categories' doesn't exist in C:\xampp\htdocs\ecomerceahad\admin_area\insert-catogories.php:6 Stack trace: #0 C:\xampp\htdocs\ecomerceahad\admin_area\insert-catogories.php(6): mysqli_query(Object(mysqli), 'insert into`cat...') #1 C:\xampp\htdocs\ecomerceahad\admin_area\index.php(93): include('C:\\xampp\\htdocs...') #2 {main} thrown in C:\xampp\htdocs\ecomerceahad\admin_area\insert-catogories.php on line 6

  • @overland5600
    @overland5600 Год назад

    Its not working heeeelp

  • @heart_beat_at
    @heart_beat_at Год назад

    Please give source code better understand 🙏🙏🙏🙏🙏

  • @tikuralmaz
    @tikuralmaz Год назад

    tnx alot 😘😍😘😍😘😍😘😍😘😍😘😍