Jump to content

benanamen

Members
  • Content count

    1,595
  • Joined

  • Last visited

  • Days Won

    25

benanamen last won the day on March 23

benanamen had the most liked content!

Community Reputation

86 Excellent

About benanamen

  • Rank
    Master Coder

Contact Methods

  • Website URL
    http://galaxyinternet.us/
  • Yahoo
    phpfreaks@galaxyinternet.us

Profile Information

  • Gender
    Not Telling
  • Interests
    Email me at phpfreaks@galaxyinternet.us

Recent Profile Visitors

2,645 profile views
  1. Its because you have that line outside the logic so it will run on every loop.
  2. benanamen

    mysqli rename table column

    OP, Why are you writing Php code for what should be a onetime DB alteration? The command line, Phpmyadmin or some other GUI that works directly on the DB makes much more sense.
  3. benanamen

    Help needed with database search and update

    When you see that you are duplicating code, in this case, the header and database connection code, you want to separate it to it's own file and include it in the files that need it. Next thing, you are dumping a bunch of JS files right smack in the middle of a table. You need to learn about "Separation of Concerns". You are also dumping the DB connection code the same way. Separate it to its on file and include it in the files that need it and not in the middle of a table. Do not output internal system errors to the user. That info is only good to hackers. You need to check the server request method, not the name of a field or button. You don't need sixteen echo's to do the job of one. Even better, you should use the Php output tag and not have your HTML mixed in with Php. There is no need to manually close the connection. Php will do it automatically. Clean up the code and you will be much less likely to have simple problems. I would also recommend you use PDO. Here is a tutorial to get you going. https://phpdelusions.net/pdo
  4. benanamen

    Help needed with database search and update

    There are many many problems with the Code posted. Directly related to what you're asking is you are using one form with no Method type for multiple rows. Calling a POST get is going to be confusing to people who know how to code. Short on time so I will have to answer more in detail later if someone else has not already provided more info on the code.
  5. benanamen

    countdown timer needed

    My last go at this thread. Java is not the same thing as JavaScript which is what you are actually referring to. Using the wrong terminology could make it difficult for you to get correct responses.
  6. benanamen

    countdown timer needed

    Sums it up pretty well. Being familiar with the OP from another forum I gave him a heads up when he showed up here. OP, I highly recommend you put some effort into learning on your own and not posting every time a question pops in your head. We are more than happy to help when you get stuck, meaning you have already made attempts on your own to find the answers you need. As you saw from the other forum, people will start ignoring you if you wear out your welcome.
  7. benanamen

    Two dropdown menu in php?

    🚩Red Flag. You need to create a dynamic site. If you do not know how to code, there are may free CMS's available. Wordpress, Drupal, Joomla... To actually create and maintain thousands of static html pages is just asking for a maintenance nightmare. You cant just copy/paste code from some help site. Your options are learn to code, pay someone to do it, or use one of the CMS's available.
  8. First thing, you need to check the Request Method, not hope a button will be submitted in order for your script to work. That will completely fail in certain cases. You need to do this: if ($_SERVER['REQUEST_METHOD'] == 'POST'){ //process form } Next, do not create variables for nothing. You already have the POST/GET variables, just use them.
  9. benanamen

    Search for any word in SQL Search

    This will be one of your greatest downfalls in programming. (And in life.)
  10. benanamen

    how to update null

    To start with, you have numerous missing curly braces. A proper IDE will forever keep you from such simple mistakes There is also quite a bit of redundant code. The multi-nested if/elses are a real mess. You need to really think through the logic. As I mentioned to you some time ago on another forum, you need to fix your database FIRST before you write any code. As I told you before, learn Database Normalization and fix your Database. Again I will say, you should be using PDO. It is going to make learning things much easier. Here is a PDO tutorial to get you going. https://phpdelusions.net/pdo. You can also download my PDO Bumpstart Database to get you up and running right away. I wrote it just for people like you getting started to learn from. https://github.com/benanamen/pdo_bumpstart_ver1.6 If you follow our advice your coding journey will move along much faster and easier.
  11. How about just trying it? But yes.
  12. Did you not read what I said about having a .php extension? A .html extension is your problem.
  13. Is the file saved with a .php extension? Are you running the file on a server with Php installed?
  14. benanamen

    Concat to Un concat?

    Something looks very not right here. Rather than showing us your attempted solution to your problem tell us about the real problem you're trying to solve
  15. benanamen

    unserialize trouble

    Perhaps this example will help. <?php $array = unserialize('a:3:{i:1;s:6:"elem 1";i:2;s:6:"elem 2";i:3;s:7:" elem 3";}'); foreach ($array as $k => $v){ echo "Key is $k. Value is $v\n"; } Result: Key is 1. Value is elem 1 Key is 2. Value is elem 2 Key is 3. Value is elem 3
×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.