-
Posts
2,134 -
Joined
-
Last visited
-
Days Won
42
Everything posted by benanamen
-
Your doing something wrong. Code should not be parsing print_r.
-
Take the quotes off the constant connection parameters in the connect string. It is also standard practice to use all UPPERCASE for constants. $connect = mysqli_connect(serverhost, serveruser, serverpass, $db);
-
Your query is failing. You are using single quotes so the variables are not being interpolated. You should be using Prepared Statements anyways. NEVER EVER put variables in the query and don't create variables for nothing. There is no need to manually close the connection. Php will do it automatically. I would also recommend you use PDO. Here is a tutorial to get you going. https://phpdelusions.net/pdo
-
Correct me if I am wrong, but you want to use the value of $id by using a completely different variable named $customerID?
-
How to modify laravel app to see modifications ?
benanamen replied to ahmedsa's topic in PHP Coding Help
Based on your post on the other forum, you should take the time to learn the basics of Laravel. I would suggest you check out the Laracast video tutorials. The third party app you are trying to modify is using a very old version of Laravel. -
OP was already advised about his code on another forum and did not implement any of the advice whatsoever. His response was "Could you please write it to me". OP, we are not a coding on demand service. You apparently didn't even attempt to copy and paste the complete working example from the tutorial you were referred to. If you just want someone to write it for you then post a job offer on any of the forums jobs section.
-
WHERE `district`= {$_SESSION['g_district']} ");
-
There is no such thing as a "from" tag.
-
Can you please provide the default sql so we can run the code.
-
OP, do you seriously think we can do something with PICTURES of CUTOFF CODE?
-
Check if person_id already exist in the table
benanamen replied to mactron's topic in PHP Coding Help
That is not the way to handle it. Set a unique constraint on the DB column(s) Attempt the insert and catch the duplicate error if any. -
OMG! I could care less about your code dude! I was just trying to help you. Good luck getting assistance with that attitude.
-
Tell you what, if you can provide a zip of your files I will review it and tell you what is wrong.
-
In that case, just remove the session start from your include files. You should have no need to check if a session has been started.
-
I'm sorry, I assumed you wanted to learn how to do things better. My bad.
-
The better approach is to have a single point of entry to the site/application. Then as mentioned, you set the session once in the main file. Here is a free video series tutorial on Php by the Laravel Laracast guy. Even I, after more than 30 years of programming learned several new things. https://laracasts.com/series/php-for-beginners
-
Sure you could but you are going to need code gymnastics to cover every possible case. Not really optimum IMO. The "extra data input" is a one time insert and you are done with it. At that point, it is as simple as selecting the column in your query.
-
Based on the site link I would say what you are looking for is a "short name" for the schools. I would add a column to the DB to hold that data. So you have columns city, school_full_name, school_short_name
-
That makes no sense at all. If you are displaying the data from the school name column why would it not be what the school is named?
-
IMO, you are just creating a problem mixing data. It doesn't matter if the school name is the same as the city. A city is a city, a school is a school.
-
Echoing out variable in a table cell doesn't work
benanamen replied to makamo66's topic in PHP Coding Help
Thanks for letting us know. -
Thanks @Psycho. Shows how much I knew about Factorials, lol.