Developing A Page That Displays Latest 5 Images In A Database
I am currently changing my web site so that it is PHP and mySQL powered. On the front page I have an area that will display the latest images in my portfolio and the latest text description.
Therefore, what I need is an admin page which allows me to upload images to a database which has a timestamp/date field, a thumbnail field, an image field, a text field for the title and a text field for the description. I also need a HTML form with inputs for the thumbnail upload, image upload, title and text description (in a textarea).
It would also be useful to have the page display the database contents and allow me to edit the details and also, delete rows. I then need code for that will display the most recent 5 thumbnails and the title on my index.php page.
View Complete Forum Thread with Replies
Related Forum Messages:
Developing Web Page Extractor???
I was wondering if anyone had a few pointers on how to create a PHP extractor? What i want it to do is go to a url like this and extract selected data from the page... eg: get the title (Patriot, The), image src, Synopsis, Starring etc, etc.
View Replies !
Storing Images In Database - Makes Page Load Much Slower?
I have just taken over a site which was developed in php / mySQL. It is a large shopping cart system. I was shocked to learn that their mySQL database was over 1GB in size. I have seen forum DB's get very large but never that large for a shopping cart site so I investigated further. It turns out they have stored all of the product images and I believe even many of the basic site images in the database itself as a longblob type. There is one table that is 860MB in size. Code:
View Replies !
Select Latest Date From Database
I have a database with a table of events. Each event has a date fieldname = events_date fieldtype = date format = 0000-00-00 What is the MySQL query to select only the one record with the latest date?
View Replies !
Displays A Date From A Database
I have a script running (with great effort and help from the group) that displays a date from a database and the amount of days to that date. I would like to change the date into a more "human" format. The date now displays: 2002-12-08 I would like to change it to: Sunday, December 08th Is this a property of mktime()?
View Replies !
Making Sure Page Shows Latest Content
Is there a way to make sure the client browser loads a php script from the server each time, rather than displaying what it has saved in the cache? I have a script which displays the contents of my Sql table, but the browser often displays the previous version, without any records that have been added since.
View Replies !
Display Latest Input Without Refresh Page
I have a mysql database that store the results of a game. This database will frequently update (new result will insert after game finished). There is any script ( i think javascript) that will display the latest result without refresh the page.
View Replies !
PHP Script That Displays Another Page Partial Content
If you go to http://europe.nokia.com/A4305060, fill the "Enter your product code:" field with the value "0523183" and press "Go" (the ending page URL varies because there's a variable session-ID in the URL-link associated to "Go") you will obtain this string: "Version: RM43_V1.10.030" Is it possible to have a string.php page that just display this string?
View Replies !
Displays 5 Posts Per Page In Descending Order
I have been doing up a website which will, among other things, display news that I input into the MYSQL database. I have a working version of this where it just displays 5 posts per page in descending order (the latest at the top of the page) with the page numbering underneath them. Now what I wan't to do is just dispaly the latest 5 posts on the page but, I want to dispaly them so that I can put in a Javascript function to maxamize and minimize each post by clicking on the title. So, I have, ID, Title, Newstype, Author, Post, Date. In my mind I see this as display each of these using the COUNT(*) thing and just subtracting 1, 2, 3, 4 to get the 5 posts I want. I just don't know how to do it.
View Replies !
Script That Reads My Log File And Displays It In An HTML Page.
I have a problem. I am trying to make a script that reads my log file and displays it in an HTML page. I got the base code from a book, being that I am still learning PHP and I needed a little help starting out. But the code I am using gives me an error. The error is : Fatal error: Maximum execution time of 30 seconds exceeded in /home/sites/home/web/php-site/log-file.php on line 15 It ranges from to line like so : Fatal error: Maximum execution time of 30 seconds exceeded in /home/sites/home/web/php-site/log-file.php on line 27 I want to know if anyone knows the specific reason or maybe a place to start at to find out the problem and the solution.
View Replies !
Displays Page Will Not Parse Till The Sql Query Is Finished.
I had PHP 4.3.3 running before I updated. When a page was loading, all the php/html that was doing simple prints of tables and images would load while an sql query was running. When the sql finished, the rest of the page displayed. I have now updated to 5.2.3 and when I go to the exact same page, nothing displays until the sql has completely finished. The issue with this whole thing is the javascript I had loading on certain pages that displayed an image telling the visitor "please wait, processing..". This no longer displays since the page will not parse till the sql query is finished.
View Replies !
PHP Page That Displays Html Based On The Address Enterd
I would like to have a PHP page that displays html based on the address enterd. For example: index.php?example=a would show a page with <body>Example1234</body> whereas index.php?example=b would show a page with <body>Example5678</body>. I've done this before, but I can't remember the code I used.
View Replies !
MySQL Query - Page Which Displays A List Of Orders
At the moment I have a page which displays a list of orders, with the following query: Code: <?php mysql_select_db($database_connOriental, $connOriental); $query_rsOrders = "SELECT *, date_format(OrderDate, '%d %M %Y') as formatted_date FROM Orders INNER JOIN Customers WHERE OrderCustomerID = CustomerID ORDER BY OrderID ASC"; $rsOrders = mysql_query($query_rsOrders, $connOriental) or die(mysql_error()); $row_rsOrders = mysql_fetch_assoc($rsOrders); $totalRows_rsOrders = mysql_num_rows($rsOrders); ?> .........
View Replies !
Images In Database Vs. Image References In Database
i kept all of the uploaded images as files on the server, and created links to them in the database. I have been changing things around now (especially directories) and I am thinking of storing the images in the actual database. I read somewhere that this can be considered a bad practice, so i was wondering what the consensus here was. In my opinion, modifying all of the code to point to the correct directories everytime a page location changes seems like a pain in the a**.
View Replies !
Developing With DOM And XMLHttpRequest
I have to write a web program (not a web site) and I was exploring all possibilities. When I found XMLHttpRequest I decided to use it. I'm interesting also in DOM, and I formuled this idea of a PHP framework: for every page of the program: - an XML file where there are all the static parts, and where the dynamic part have to go (after a DB query, etc.) you put something like <div id="where_the_table_have_to_go"></div> - a .php file that initialize the dynamic data of the page, created with DOM objects and with something like that (I don't know the correct syntax, it's only an idea): $doc = new DOMDocument("file.xml"); // DB query and $table creation with DOMElement and so on... // and finally $panel = $doc->getElementsByTag("where_the_table_have_to_go"); $t = $panel->createTextNode($table.saveHTML()); // I don't know if TextNode is correct :) $panel->appendChild($t); - a .php file with the right Javascript code to use XMLHttpRequest. When in the browser a change occours, the JS function call this file to upgrade the desired node of the page. Finally he answers with something like: creatTextNode($table.saveHTML()); Is all that possible? Anyone knows if there are some libraries that uses DOM and XMLHttpRequest together? Is it possible to update only a node of a page with XMLHttpRequest?
View Replies !
Worthwhile Developing In PHP 5?
I am about to begin a new project and am deciding whether to begin in PHP5 with the beta release or stick to the current 4.x production release? I am expecting to have the system launched in approx 4 months and wouldnt be surprised if PHP5 final is out....
View Replies !
Developing Spiders
How do i develop a spider using the PHP scripts...mactually i need to develop a databaseby extracting the data from the election commission of india website......can anyone help me..?
View Replies !
Developing PHP Pages In MS FrontPage
I am doing my PHP development in MS FrontPage. At on time, when in Frontpage and I would double click on a page in my development folder, FrontPage would open it. Now when I double click, Notepad opens it. I have check my extension settings and my setting is that FrontPage should open an file ending in .PHP. Now what I have do is right click the file name, and use "Open With...." to open it in FrontPage. Somewhere, Somehow, I must have changed a setting to screw this up. Can someone suggest when I need to do to get the double click action back so the ..php file is opened with FrontPage.
View Replies !
Developing Proprietary Apps
The ease of use, power, flexibility and low overhead to run it is amazing. I am tempted to convert my entire software to PHP but have a few questions and concerns before heading down this path. In short my program provides specialized web-based reporting and statistical analysis using a variety of data sources. All of these data sources can be converted fed to a centralized MySQL DB easily using VFP (no VFP comments please). My major concern is this "open source" PHP philosophy being in a very competitive and very propriety niche industry. Is it true that anyone accessing a PHP program on the net can easily download all source? Are there any protections for proprietary code or does that go against the very nature of PHP? I like PHP but can not throw this application to the wolves. I've narrowed my decision down to PHP or VB.NET and definitely prefer PHP.
View Replies !
Hosting & Developing Advice
1. What sort of hosting will I need for the following website...Will I need dedicated hosting, a normal package or my own server? 2. What's the best hosting platform? Apache? 3. Basic security advice so my database doesn't get hacked! Basically I want customers to be able to visit my site and upload pictures to some webspace that is Automatically assigned to them. I don't want to have to manually sort all webspace out. A good working example of this is Hotmail - when you sogn up to an account you're automatically assigned a disk quota. How do I go about doing this in PHP. Is it the best language to do this in? Also, how do I detect the amount of webspace a user has "used". For example, the status bar showing how much of your inbox you've used within Hotmail. Code:
View Replies !
Strategies For Developing A Bilingual Website?
I have a php/mysql site and I am wondering if anyone has suggestions about strategies for making it bilingual or resources on how to do this. I thought of one way which would be to replace the text with calls to a database which has all the text in it. But I would prefer to have a single file with phrases and then just be able to translate that single file into another language to produce a site in another language.
View Replies !
Checkboxes - Developing Attendance Form
I'm currently developing this attendance form where the user ticks on the checkbox of the employee whom he wants to edit the attendance information. The logic is to tick the box of the employee that you want to edit. However, i can't seem to make it work. I've tried doing a foreach loop but it is still not working. can someone help me to figure things out?
View Replies !
Preventing HTML In A Post (developing A Forum)
My problem is this, when I enter information into my database, if I press enter to leave a line between the paragraphs, that line is automatically ignored and everything is compressed into one big paragraph. I'm using VARCHAR for my setting, (mysql) and I'm using a standard query mysql_query ("INSERT INTO nf_forums (forum_name, forum_description, forum_category, forum_rules_title, forum_rules, forum_verify) VALUES ('$forum_name', '$forum_description', '$forum_category', '$forum_rules_title', '$forum_rules', '$forum_verify')"); If anyone can point me in the right direction so the spaces from people pressing enter will show up when I call then from the database that would be great.
View Replies !
Images In A Database
I had a more barebones version of this script working, but when I tried to put it in with my larger script, it broke. I think the problem lies somewhere in the uploading, but I'm not sure of this. Anyway, here's what I have:
View Replies !
Images And Database
I need an efficient way to store tons of images (just image names, not the file). Then, recored for every 24 hours, an IP address for everyone that has clicked on the LINK to the image. I was thinking Text Files would be a good choice, but I don't know how to go about this.
View Replies !
Getting Images Out Of A Database
So I've managed to upload my images into a database, but I have no idea how to get them out. here's the source for my gallery upload . I just took that off a site and then tried to incorporate it into my own locally hosted site. I can't work out how to get the images out of the database on another script.
View Replies !
Images From Database
I have a series of images in my database, they are alpha-numerical codes for the sake of email sending verification. I want users to copy the code from the image into the text box correctly before their message gets sent via a website (to reduce the auto spam) I got the images into the db ok, and can display them at random in the middle of my html by calling in a separate php page. html page: <img src='image.php' /> <input type="hidden" name="id" value="<?php ***'id from image.php*** ?>" /> enter code: <input type="text" name="code" /> image.php page: $sql = "select image from table order by rand()"; $result = mysql_query($sql); $row = mysql_fetch_array($result); header("Content-type: image/png"); print $row[image];
View Replies !
Developing A Php Mysql E-commerce Clothes Shop Site.
My final year at uni and developing a php mysql e-commerce clothes shop site. i've been doing ok but its very basic and doesn't look very professional as i've had to teach myself this stuff from scratch. I was just wondering if anyone has any examples of a site like this or any code examples? even a tutorial would help as i'm just totally lost.
View Replies !
Images In MySQL Database.
I really do not want to put images in my database, but I want to be able to have a script where users can upload an image, and it will be stored in a database (the file name, name of owner, and the trick performed). Then it will be placed in a gallery.
View Replies !
Deleting Images Associated In Database
I've got a database structure with rows containing filenames of photos on the server each with its own uploader/user and unique id number. Can someone help me on how to delete an array of photos from the server uploaded by a specified uploader/user?
View Replies !
Getting Images To Show Up From Database
I am trying to include images on a product page for a site and an email link on each product with the name of the product in the subject line. I have a sperate folder with the images (called products) and within product there is a folder called thumbnails- the image path would look like this: products/thumbnails/image1.jpg I am getting an area for the image but no image. As for the link- how do I put a subject line into the email in the php code? Can I do this? Code:
View Replies !
Way Of Displaying The Images, From The Database
Im kind of a novice at PHP programming and need some help on what may be a simple problem, with hopefully a simple solution. I am trying to write my own photo gallery. I need a way of displaying the images, from the database, as a block like below Code:
View Replies !
Displaying Database Images
I need to display a thumbnail of a large image that is contained in a database. I cannot upload a thumbnail into the database for various reasons. I have a function that resizes images before inserting into a database, and I know how to display image data from the DB into the browser so I have a rough idea of what's involved. My problem is that I need to get an image from the DB, resize down it and display it in the browser on the fly.
View Replies !
Storing The Images In Database
I have around 500 images each of 70 to 100kb. I want to store it on the webserver. I can store it by directly uploading it (standard way we do it) or can upload to database as medium blob. The upside of storing the images in database is that i can easily have number of views and rating using table fields but i have been suggested by many friends that storing on database using blob is not preferable.
View Replies !
Retrieving Images In Database
I've successfully uploaded images to a database (I think - [BLOB - 22.8 KB]), but I have no idea of how to pull them back out and display them. Here's what I tried: PHP Code: print " <tr> <td width="48%" align="right"><h2>{$row['title']}</h2>{$row['text']}</td> "; Â Â Â Â print "<td width="4%"> </td> "; Â Â Â Â print "<td width="*" align="left" valign="mid"><img src="{$row['image']}" /></td> </tr>";
View Replies !
Reg Exp: Want To Remove All Images From Page
I looked at a couple tutorials on reg exp. But have not found a way to remove all images from a page. HOw can i do it? It seems easy enough $text = ereg_replace("<img src [then everything until] (gif|jpeg|jpg)">[anything here]</a>); I just can't get it, after so many tries. Have searched google too. Any ideas?
View Replies !
Howto Images From A DB To A Web Page
I am in a hurry to learn this so I am looking for a tutorial that shows how to upload the info in the database and then use php to load the images into cells of a table on a web page. Sort of like a gallery but for displaying products. I am studying how to make thumbnails for the main page and allowing a user to click on it or a link and open a new window with the larger view of the product. I am sure this has been done a hundred times on the net but it is new to me. Anyone know of some good tutorial on doing what I am talking about.
View Replies !
Grab Images Off A Web Page
Can someone help with a script to grab all images from a page then save them to a directory on your server. For example I'd put yahoo's url and it would grab all the images on the front page and save them to my directory.
View Replies !
|