PHP + MySQL Best practice [closed] - php

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
So I'm having some trouble explaining to my buddy why a specific piece of code is "bad practice", does anyone know where I can find some information on why it's a bad way to do it? (Or maybe it's just me who think it's bad).
Here's what he wants to accomplish:
Create a "dynamic form input", so he will create a table with different types of cols. And then in the file that shows the form he will just make alot of different "if type == varchar" etc. and then display a form after that
When saving a form he will loop thru all the $_POST data and insert it into a table depending on the key's etc.
He want's to make everything dynamic and I can see why that could be cool, but in my book this seems to be very bad practice, so is there a better way to do this or is there some articles I can show him about why this is bad etc.?
Everything is for a private admin panel, but still I feel there is a lot of issues.

Related

Is setting picture names to dates of their creation in the database the best way to name pictures so that they'll be unique? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 11 days ago.
Improve this question
My goal is to add pictures inserted by user into a database. So I'm trying to set their names to the date of their creation. The format is "day.month.year hour.minute.second". But I'm facing the problem that the only one picture is added to the catalog. I'm thinking that the reason why it happens is because the script runs too fast for a second to pass.
And that made me think if this is a good idea to name pictures this way.
I started to assume that maybe I need to use some kind of library to manually add a second to every next picture's name.
But before doing that I decided to go ask somebody more profecient than me in order to undesrtand whether I need to do it this way or maybe there's a better one

I want to make an online recruitment website [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I want to make an online recruitment system(web) for my project in school. What are the language I need to learn except PHP. Thanks for the answer guys.
Not very proper question, you might find the answer by googling.
Anyway, You might need so far:
HTML: It will be like the skeleton of your page.
CSS: Basic knowledge would be a plus for understanding how to make it pretty.
MySQL: Unless you want a static page, you would need DB in order to save the data itself. Useful for manage cookies, sessions, users, etc.
My advice - Download some HTML free template and use it as base. Integrate it with PHP for DB connection and usage.

Are there alternatives to using a MySQL database for simple tasks like this? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
Suppose I want a webpage containing only a tick box. I wanted it to be possible for anyone to change the value of the tick box, and then the value to update for anyone checking the page, would I have to use a MySQL database? Or is there a better way to do it?
You want a really simple thing. Of course you can use a database like MySQL for it, but it is seriously not needed in any way. You just have one value, so you could have a text file with that value and it would work too. It depends on what data you want to store.
A database is good because it offers you for example things like the query.

How can I Print a result on webpage using php getting from MySql database [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have a school website, I have uploaded the students examination result to the database but now I want to make a search bar by which can the student search their result by typing their roll number.
please someone give me the code. please
#wajahat-aftab - you can always find a great tutorial to do this. Here are few of the links
https://www.youtube.com/watch?v=N_S7_wg87GU
http://html.net/tutorials/php/
http://www.htmlgoodies.com/beyond/php/article.php/3472391
Basically you need to get the data, manipulate it and send it to the HTML page. Once you get the data in HTML you can present it any kind of look-n-feel as per your needs.
You can not expect exact answers for such questions - so I suggest you to be more specific with QUESTION and make sure that you also share the source code that you tried so far.

Retrieving related values in database from listbox PHP [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Good day! I am fairly new in PHP and I am trying to develop a website that can retrieve and display stored information from the database. The catch is, the information that will be retrieve will be based on the selected value from the list box (the list box you can create in html).
I have one list box that contains all the names of the users and would like to display all the related information for that user on a specific table in my database.
To be completely honest, I have no idea how to do this. I can retrieve all the values from a specific table in my database and that's all I know.
Hoping someone would be patient enough to teach me how to do this or guide me if this is even possible in PHP.
Thank you in advance.
You will need to read on doing database operations using PHP with PDO.
Once you've done that, the rest will be pretty easy, you will have to learn how to work with forms with PHP,
which you can do here.

Categories