generate dynamic html pages and store in mysql using php - php

im doing one simple project for an advertisement agent in php. in that when the admin upload the name,images and description of the product the data need to store in mysql(completed) and a html page need to create for that particular product in that html page the data which is inserted into the database of that particular product need to display. Is that possible? Any refference is there...?

The data you want to display to the user, you can do the task via PHP. Get data from mysql via PHP & display it to the user. Why creating the separate HTML page!

Yes, Possible.
Upload Product image on the server and store images link, name and description in MySQL Table.
In your php script make connection to the database and fetch the data in your php script. After display the data as you want.
PHP CRUD Tutorial (part 1)
File Upload and View With PHP and MySQL

Related

comparing listview's and need to display related list items in next page using mysql , php in android

i had a list view with image and text which is fetching from mysql using php as a scripting language once i clikced on any item the products related to that item should be displayed in the next page ina listview how to do it in php and mysql in android thanks in advance*
list of data image with the list view
list view with related images
It can be done by sending the varaiable from Android to the PHP page.
In my URL I send the variable to PHP by attaching it to the URL like this:
"http://192.168.1.12/connect.php?"+orderid;
In my PHP program:
$orderid=$_POST["orderid"];
$sql="select * from image where orderid='$orderid'";

table showing from database in web page using JSON PHP

Assuming a number of database tables exist on your MySQL server, the html web page must provide the user with the means to choose a single database table and subsequently display this as a table on the same web page without refreshing the whole web page. A drop-down list box is to be used to present the list of available database tables to the user. The drop-down list box contents must reflect the database tables presently available on the MySQL server without further web development amendments i.e. available database table names must not be hardcoded into the web page. This information must be obtained when the document has been loaded and must be returned as JSON.
Please guide me
You can create an api in your server to getList all the database table name. Which will fill up your drop down in the UI.
Create another api which will take tableName/tableId as a parameter. Then get the data from that table. Rest you'll have to figure out.

how to view complete excel page with formatting while importing data from MySql

I have created a form that looks like a Microsoft Excel sheet. User is entering data in form and submitting it. The data is successfully getting inserted into my database MySql.
I want to retrieve data from MySql and show echo the database values on my page in a excel sheet grid view.
Two ways:
First is to use html tables when fetching data.
Second is just make a simple input boxes & when you click submit, it will save as an excel file, in a temporary folder, php will fetch it and sql will save it in the database. Then you can just have a simple upload function to upload the excel file to your browser and it will display in a proper grid view. I have made this before and I can assure you this is possible. But if your still learning php, the first option is the fastest and easiest way.

Dynamically create content from SQL database

So basically all I want to do is a basic image uploading page. When the user fills out a form they submit a file either from their computer or from a URL then the image gets stored on the server.
I want to then display the images on a HTML page. I already have the code to dynamically create the divs that would hold the uploaded content.
function AddTiles() {
var mydiv = document.createElement("div");
mydiv.setAttribute("id", "mydiv");
mydiv.setAttribute("class", "tiles");
mainContent.appendChild(mydiv);
}
But whenever you upload the image the page refreshes, and then the divs would no longer be there to place the image in. So I want to save the image to a database instead, and then on page load, read through the database and generate the html content and then display the images.
So if there were 4 images in your database, then the program would create 4 div tags and put each image in its respective div tag.
Also, I just need the code to read from the database and create the html content on load. I can create the database and store the images with no problem.
If you are going to read and output information stored in a database, you might as well generate the HTML content on the server-side (PHP) without using JavaScript i.e. echo "<img src='$url' />".
You can also read PHP MysQL Select tutorial for more information on retrieving data from your database.

JavaScript form into PHP table

I am creating a website. On one of the pages there is a JavaScript form that asks for the usual information: Name, email etc and then I need to save it into a table using MYSQL and then I want to display the table using PHP on another page. I have no idea how to start saving the data into a table (when Submit is hit) and then displaying the table on another page. Any advice?
http://teamtutorials.com/web-development-tutorials/php-tutorials/inserting-data-into-a-mysql-database-using-php#.T5rIZLNWq9Q

Categories