Search found 14 matches
- Sun Aug 12, 2012 11:50 am
- Forum: PHP - Code
- Topic: How to make a thumbnail link to a larger image??
- Replies: 1
- Views: 324
How to make a thumbnail link to a larger image??
Hi there guys, I've got script that takes an image, re-sizes that image to a thumbnail size (150x150px) and stores the path in a database. uploadimage.php //writes the information to the database //the empty quotes below is where the image id will be stored //$thumb_path is stores the thumbnail path...
- Sat Aug 11, 2012 2:45 pm
- Forum: Databases
- Topic: Output image using path in Database??
- Replies: 1
- Views: 6744
Re: Output image using path in Database??
Hi Guys, Thanks for the help but i've just managed to fix this, the issue was that i was outputting the image with full path, so i got rid of the config file and replaced the following: index.php //replace this //require_once dirname(__FILE__).'/includes/config.php'; //$dir = $config['upload_dir']; ...
- Sat Aug 11, 2012 12:43 pm
- Forum: Databases
- Topic: Output image using path in Database??
- Replies: 1
- Views: 6744
Output image using path in Database??
Hi there guys, i've got this script that lets the user upload an image with a title, then stores the image path in a database and then retrieves the image and the image title using the path and the title stored in the database. Unfortunately i'm able to do everything except output the image and the ...
- Mon Jun 04, 2012 1:07 pm
- Forum: PHP - Code
- Topic: Issues connecting to a database using a class and mysqli
- Replies: 1
- Views: 245
Issues connecting to a database using a class and mysqli
Hi there guys, I've just started the oop in php and i've managed to create a class and connect to the database using mysql_connect but i'm having some issues when i try to replace mysql_connect for mysqli_connect, can anyone point me in the right direction. Thanks fellas. main_file.php <?php require...
- Thu Dec 15, 2011 9:43 am
- Forum: PHP - Code
- Topic: Displaying a list of the errors and re-displaying a form???
- Replies: 5
- Views: 1086
Re: Displaying a list of the errors and re-displaying a form
Ooohhhhh you are my very good friend from now on :D , if you could only imagine the hours I've wasted reading about re-displaying forms, $_SERVER['PHP_SELF'], trying all possible scenarios :banghead: ....anyway I've follow your advise and it works like a charm also may i ask why i don't need to use ...
- Thu Dec 15, 2011 4:45 am
- Forum: PHP - Code
- Topic: Displaying a list of the errors and re-displaying a form???
- Replies: 5
- Views: 1086
Re: Displaying a list of the errors and re-displaying a form
hi there social_experiment thank you for your reply, right so maybe i did not explain myself the way i should, im already displaying the errors on the same page i just dnt want the user to re-writte his/her name again if the only thing he/her wrote wrong was the email, do you understand what i mean,...
- Wed Dec 14, 2011 5:42 pm
- Forum: PHP - Code
- Topic: Displaying a list of the errors and re-displaying a form???
- Replies: 5
- Views: 1086
Displaying a list of the errors and re-displaying a form???
Hi there guys im doing a simple login system using a flat file, i've managed to do the hardest but for some reason i cant seem to figure it out how to echo the errors as a list below the form also i'm having problems in re-displaying the form so that when a user writes his username and does not writ...
- Mon Nov 07, 2011 1:32 pm
- Forum: PHP - Code
- Topic: Statistical summary script
- Replies: 12
- Views: 962
Re: Statistical summary script
got it, now makes more sense thank you Celauran.
- Mon Nov 07, 2011 1:23 pm
- Forum: PHP - Code
- Topic: Statistical summary script
- Replies: 12
- Views: 962
Re: Statistical summary script
Right got it i've also changed the array number to 5 so now its outputting this: April Statistics The Total files requested: 1000 The Total bandwidth used: 8.43MB (8,430,877 Bytes) Total 404 Errors: 102 The following files produced errors: not/available articles/not/a/page typo/in/path Just one last...
- Mon Nov 07, 2011 12:59 pm
- Forum: PHP - Code
- Topic: Statistical summary script
- Replies: 12
- Views: 962
Re: Statistical summary script
right now i'm trying the for loop to echo the only 3 errors on the file which are:
not/available
articles/not/a/page
typo/in/path
instead of echoing 102 times
not/available
articles/not/a/page
typo/in/path
not/available
articles/not/a/page
typo/in/path
instead of echoing 102 times
not/available
articles/not/a/page
typo/in/path
- Mon Nov 07, 2011 12:51 pm
- Forum: PHP - Code
- Topic: Statistical summary script
- Replies: 12
- Views: 962
Re: Statistical summary script
Thank you so much Celauran that really helped I'm still going to try to improve it since its echoing a list with 102 errors I just need it to echo 3 nevertheless thank you so much I'm really appreciated
- Mon Nov 07, 2011 10:58 am
- Forum: PHP - Code
- Topic: Statistical summary script
- Replies: 12
- Views: 962
Re: Statistical summary script
Right so i've managed to calculate the total bandwidth and the total files requested with the following code: <?php // Opens the file "april" in read mode only $fileLog = fopen("april.txt", "r"); // Variable to count the total bytes used during the month $totalBytes = 0...
- Mon Nov 07, 2011 8:57 am
- Forum: PHP - Code
- Topic: Statistical summary script
- Replies: 12
- Views: 962
Re: Statistical summary script
You right I completely forgot sorry about that...here is a bit of the file: 103.239.234.105 -- [2007-04-01 00:42:21] "GET articles/learn_PHP_basics HTTP/1.0" 200 12729 "Mozilla/4.0" 207.3.35.52 -- [2007-04-01 01:24:42] "GET index.php HTTP/1.0" 200 11411 "Mozilla/4....
- Sun Nov 06, 2011 3:17 pm
- Forum: PHP - Code
- Topic: Statistical summary script
- Replies: 12
- Views: 962
Statistical summary script
Hi there; I am trying to to write a PHP script that examines and extracts the data from a log file and produces a statistical summary of the contents: total number of file requests in the month, number of file requests from the articles directory, TOTAL bandwidth consumed by the file requests over t...