Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I'm just a beginner of PHP and I am working for making a multiple-choice type question paper. And I want to stores answers of these question in the database and also want to fetch result from database. And also I want to show result of attempt in percentage e.g. Your result is 40%.
I'm running PHP on WAMP server.
Welcome to Stack Overflow, we are here to help you correct your bugs and help you if you get stuck in coding. We are not freelancers, so please do not ask such questions which literally mean "do my homework!".
But hey, let me give you a basic info on how you should start up. First create a php page with form which contains all questions at once or like a wizard (depends on your needs). Later, you need to create a database, with two tables (maybe more) which are questions and answers. These shouldn't contains huge amounts of html chunks, but should be straight questions and answers with a foreign key to link them. Then use php to generate random questions and answers and use normal post/get (usually not user friendly) or AJAX (better performance).
If you get stuck in any of the steps above, then come back to StackOverflow and share your query with invalid codes and similar. Hoping this was helpful :)
Related
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 3 years ago.
Improve this question
Please forgive me if this has been asked and answered before, but I couldn't find it in the search.
As stated in the title, I have a form built in HTML. I need the user inputted data to be displayed in an HTML table. I know the easiest way to accomplish this is probably to do so using SQL to store and then retrieve the data and PHP to output it in the table itself. For the life of me I cannot get this to actually work. Google is absolutely my friend but literally nothing I've tried actually works. Examples would be wonderful and I seriously appreciate the help! Thanks!
This link could help you: https://stackoverflow.com/a/15251402/4149985
Basically, you need a web server, either locally or via a hosting provider with access to a database.
Your database needs to have a table, which contains records.
You need to use PHP to connect to the database, retrieve the records and then output them as a HTML table.
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.
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
The question is, if I have got 100 entries in my Database and want them all getting displayed on my page, how can I only show a selected Number like it's the case in webshops etc.
There you've got 37 products e.g. and after 10 products you have to select number 2 of the entry list.Its all split up in a few sites, but its still the same site.How can i achieve this.
You can achieve the pagination either by client side implementations or server side.
Client side (using Java Script/JQuery) and Server Side (using PHP) is preferable.
For client side, just follow this
link
For Server side
PHP Pagination
I notice that you put php, html and mysql as tags on your question so it's mean you don't have a clue on what you are doing. You should really study those things in separate a little more.
For the MySQL part you must study the limit directive.
The html part is not big deal also, you will have to make a pagination system. As said before Google is your friend.
On the server-side (php) you should look for the parameters/url on the page defined by the html part and make the proper query.
If I would enter in details of each of those steps I would have to write several paragraphs and still would be things missing. Well, at least I've given you directions, now you really should study more before attempting to do things like this.
Next time don't ask questions too vague/broad. Try to focus on specific issues rather than asking for the whole solution.
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
Hello everyone, I have a project and I want to create an MVP: Minimum Viable Product.
And I have html pages ready but I don't know how to make them interact with databases, preferably MySQL.
I need the simplest way to be able to POST and GET data from a database, PHP or Rails.
IF there's just one simple tutorial or a small ebook to read, I'll be so thankful.
I have to the end of the month to create the MVP, about 20 days or so, and I really want to make that happen and I was gonna learn the whole Rails just to do that, but it'll take time you know!
Thanks for your time and I hope that you might help me :)
You can't make HTML directly interacting with database. You should create server-side application, which answer queries generated by HTML forms, JS queries, etc. I am PHP developer, I like this language, so I recommend you using it in your solution.
You can read about connecting PHP to MySQL database here:
http://www.w3schools.com/php/php_mysql_connect.asp
There you have basic information about handling data sent by POST:
http://www.w3schools.com/php/php_forms.asp
If you have any troubles during develop proccess try Google before, then if didn't find answer ask specific and well described question on Stack Overflow.
Best luck!
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
as the title reads I'd like to find a webpage which presents an overview of the php language cause it's been a little while since I stopped to program server scripts.
By overview I see a page with the basic writing of the language (variable writing and the types, the control flows, some writing recommandations and some common functions about arrays and string manipulation) of course without the explicative text that generally comes with tutorials, I just want to refresh my memory about the basis.
I used google to find my request but not seeing anything like this on the first page.
I prefer asking here cause I trust in the stackoverflow community. If you have a personal page that refers to my wanting feel free to post back
edit: this sheet seems to be fine if you want php get the surface of your brain back
http://www.emezeta.com/weblog/emezeta-php-card-v0.1.png
I would say this:
http://oreilly.com/catalog/phppr/chapter/php_pkt.html
Combined with this:
http://www.addedbytes.com/cheat-sheets/php-cheat-sheet/
One great source to find information is actually stackoverflow. Whatever specific problem you encounter, the answer is sure to be found on this site :)
Good luck, PHP is fun!