litebearer
Members-
Posts
2,356 -
Joined
-
Last visited
Everything posted by litebearer
-
If you are unable to write the code, perhaps you need to check PHPFreaks free lance section
-
Show us what YOU have tried thus far, as well as any error messages you have received
-
Aside... four columns, five values: </pre> <ul>$query = "INSERT INTO TDBOE (Description, name,size, data ) " ."VALUES ('THIS IS A TEST', '$fileName', '$fileSize', '$fileType', '$content')";</ul> <
-
Session Variables - Is there a smarter way to do this?
litebearer replied to ramone_johnny's topic in PHP Coding Help
Consider ... session variables can contain arrays; $_POST is an array -
Might look at this... http://snipplr.com/view/39009/
-
perhaps this '%$word%' rather than '%+ $word +%'
-
If you use OR the test will fail - ie if one is good and one is bad, OR both are bad , it will produce fail If you use AND then both conditions must be bad for it to produce fail Soooo. if($a !== $b AND $a !== $c) {then do something }else{do something else}
-
might help you http://www.phpeveryday.com/articles/PHP-MySQL-Editing-data-P284.html
-
updating is a simple a populating a form using the data from the data base. experiment... 1. get and display data for a particular user 2. echo the values into the "value" of the appropriate form field search google for "php mysql UPDATE tutorial" when you get stuck on a particular part come back and show us what you tried and what errors you received.
-
rough idea... $db = new mysqli($dbserver,$dbuser, $dbpass, $dbname); $query = "SELECT field FROM tablename"; $results = $db->query($query); $num_row = $results->num_rows;
- 16 replies
-
- mysql_num_rows
- depreciation
-
(and 1 more)
Tagged with:
-
Might also look into http://www.php.net/manual/en/function.file.php inconjuction with http://php.net/manual/en/function.in-array.php
-
Need help retrieving results from certain table
litebearer replied to Jdog's topic in PHP Coding Help
1. get rid of the @ error suppression 2. echo your variables and queries to determine they contain what you expect them to contain -
Breaking Long Paragraph Into Read More Link...
litebearer replied to thara's topic in PHP Coding Help
Psuedo code... $content = place some text into a variable $array01 = explode(" ", $content) --- explode your variable into an array using the SPACE as the separator $count = count($array01) --- count the number of elements in the array if($count<=50) { $teaser = $content --- if 50 or less then you can use the $content as your 'teaser' }ELSE{ $array02 = array_splice($array01, 0, 50) --- if greater than 50; use array_splice to place the first 50 elements into a new array. $teaser = implode(" ", $array02) --- Then use implode to create your 'teaser'; using the SPACE as the separator. } -
Breaking Long Paragraph Into Read More Link...
litebearer replied to thara's topic in PHP Coding Help
Since you are looking to use "words" rather than "characters"; look into how array_slice may help you accomplish your goal. (hint: create an array of the content using the SPACE) -
(20120-1-01 00:01 - 20120-1-01 07:59) ; (20120-1-01 08:00 - 20120-1-01 15:59) ; (20120-1-01 16:00 - 20120-1-01 11:59) ?
-
what does this stand for in a function?
litebearer replied to dodgeitorelse3's topic in PHP Coding Help
It would help if you displayed the function in which it is used. As you may have noticed, there is an incrementation of 1 for occurring; however, without seeing the actual function we cannot definitively describe what/why/how that incrementation is being used. -
A quick look seems to indicate the problem can be found in these four lines... $tmp = imagecreatetruecolor($max_width,$file_height_new); imagecopyresampled($tmp,$src,0,0,0,0,$max_width,$file_height_new,$width,$height); imagejpeg($tmp,$upload_dir . $file_new,100); if(move_uploaded_file($file_tmp, $upload_dir . $file_new)){ it appears that you are saving the resized image, then overwriting it with the original.
-
Yes, he meant the FULL output.
-
start by locating the file that processes the login. show that file here.
-
Where did you acquire WD_DataAssist?
-
Take a look here http://www.maxmind.com/app/postalcode
-
1. has the file been successfully uploaded? 2. do you know the path to the file?
-
My suggestion is to start small ie create a simple test file using the tutorial provided above to see how to upload a file. Once you do that you will see how to change your actual scripts. Most new phpers try to do too many things at once. build your scripts in increments. Makes life sooooo much easier when trying to debug.
-
re: uploading files - http://www.tizag.com/phpT/fileupload.php/ re: attaching files to email - http://webcheatsheet.com/php/send_email_text_html_attachment.php