# Code Snippets

**URL:** https://www.phphelp.com/c/code-snippets/11.md?page=2

[Latest](https://www.phphelp.com/latest.md) · [Categories](https://www.phphelp.com/categories.md)

**Page:** 3

---

## [seeking script...](https://www.phphelp.com/t/seeking-script/22610)

<div class="topic-metadata">

**Author:** [@ctguy44](https://www.phphelp.com/u/ctguy44)\
**Replies:** 1\
**Last updated:** [May 2, 2014, 11:42pm UTC](https://www.phphelp.com/t/seeking-script/22610 "2014-05-02T23:42:22Z")

</div>

This may seem an odd request, but here it goes. I have “Person A” seeking a script (which I could customize) to be able to login, upload an image (or pdf) with form elements such as a pulldown menu and “comments” box. T…

---

## [MOVED: Database Login Script - PDO](https://www.phphelp.com/t/moved-database-login-script-pdo/22409)

<div class="topic-metadata">

**Author:** [@astonecipher](https://www.phphelp.com/u/astonecipher)\
**Replies:** 0\
**Last updated:** [March 27, 2014, 4:58pm UTC](https://www.phphelp.com/t/moved-database-login-script-pdo/22409 "2014-03-27T16:58:33Z")

</div>

This topic has been moved to General PHP Help. \[iurl\]http://www.phphelp.com/forum/index.php?topic=20751.0\[/iurl\]

---

## [MOVED: Php Custom video player](https://www.phphelp.com/t/moved-php-custom-video-player/22408)

<div class="topic-metadata">

**Author:** [@astonecipher](https://www.phphelp.com/u/astonecipher)\
**Replies:** 0\
**Last updated:** [March 27, 2014, 4:57pm UTC](https://www.phphelp.com/t/moved-php-custom-video-player/22408 "2014-03-27T16:57:43Z")

</div>

This topic has been moved to General PHP Help. \[iurl\]http://www.phphelp.com/forum/index.php?topic=20920.0\[/iurl\]

---

## [MOVED: Some problem in calling php function from jquery ajax Page](https://www.phphelp.com/t/moved-some-problem-in-calling-php-function-from-jquery-ajax-page/22407)

<div class="topic-metadata">

**Author:** [@astonecipher](https://www.phphelp.com/u/astonecipher)\
**Replies:** 0\
**Last updated:** [March 27, 2014, 4:56pm UTC](https://www.phphelp.com/t/moved-some-problem-in-calling-php-function-from-jquery-ajax-page/22407 "2014-03-27T16:56:41Z")

</div>

This topic has been moved to Javascript & Ajax. \[iurl\]http://www.phphelp.com/forum/index.php?topic=22633.0\[/iurl\]

---

## [MOVED: How do I embed links behind images?](https://www.phphelp.com/t/moved-how-do-i-embed-links-behind-images/22406)

<div class="topic-metadata">

**Author:** [@astonecipher](https://www.phphelp.com/u/astonecipher)\
**Replies:** 0\
**Last updated:** [March 27, 2014, 4:56pm UTC](https://www.phphelp.com/t/moved-how-do-i-embed-links-behind-images/22406 "2014-03-27T16:56:04Z")

</div>

This topic has been moved to General PHP Help. \[iurl\]http://www.phphelp.com/forum/index.php?topic=22412.0\[/iurl\]

---

## [IMDB Error 404 Movie Quotes](https://www.phphelp.com/t/imdb-error-404-movie-quotes/22359)

<div class="topic-metadata">

**Author:** [@awl19](https://www.phphelp.com/u/awl19)\
**Replies:** 1\
**Last updated:** [March 24, 2014, 2:10am UTC](https://www.phphelp.com/t/imdb-error-404-movie-quotes/22359 "2014-03-24T02:10:00Z")

</div>

Anyone else frequent imdb.com? A couple months ago I was checking out some trailers and stumbled upon IMDB’s error 404 page. If you haven’t seen it, it’s quite awesome. http://www.imdb.com/404 Anyways, I wanted to use …

---

## [pass jsdn array element from php page to jquery](https://www.phphelp.com/t/pass-jsdn-array-element-from-php-page-to-jquery/22234)

<div class="topic-metadata">

**Author:** [@pankajdurve](https://www.phphelp.com/u/pankajdurve)\
**Replies:** 2\
**Last updated:** [March 3, 2014, 8:05pm UTC](https://www.phphelp.com/t/pass-jsdn-array-element-from-php-page-to-jquery/22234 "2014-03-03T20:05:55Z")

</div>

How to pass jsdn array element from php page to jquery

---

## [imagecopyresampled not working 100%](https://www.phphelp.com/t/imagecopyresampled-not-working-100/21826)

<div class="topic-metadata">

**Author:** [@mrtn](https://www.phphelp.com/u/mrtn)\
**Replies:** 1\
**Last updated:** [January 4, 2014, 3:46pm UTC](https://www.phphelp.com/t/imagecopyresampled-not-working-100/21826 "2014-01-04T15:46:46Z")

</div>

HI All! I have a question about the funtion imagecopyresampled. I have a big image ($src) that i will crop and that use imagecopyresampled to create the new (cropped) image. (always 980 x 435) But when I give the follo…

---

## [MOVED: login code not working](https://www.phphelp.com/t/moved-login-code-not-working/21813)

<div class="topic-metadata">

**Author:** [@astonecipher](https://www.phphelp.com/u/astonecipher)\
**Replies:** 0\
**Last updated:** [January 2, 2014, 5:07pm UTC](https://www.phphelp.com/t/moved-login-code-not-working/21813 "2014-01-02T17:07:06Z")

</div>

This topic has been moved to General PHP Help. This is not a code snippet. Please use the appropriate forum. \[iurl\]http://www.phphelp.com/forum/index.php?topic=22183.0\[/iurl\]

---

## [How to grab remote cookies and send them back to the browser](https://www.phphelp.com/t/how-to-grab-remote-cookies-and-send-them-back-to-the-browser/21646)

<div class="topic-metadata">

**Author:** [@ghassan](https://www.phphelp.com/u/ghassan)\
**Replies:** 2\
**Last updated:** [December 6, 2013, 12:28am UTC](https://www.phphelp.com/t/how-to-grab-remote-cookies-and-send-them-back-to-the-browser/21646 "2013-12-06T00:28:07Z")

</div>

Hello, I am building a simple proxy between the client and webservers such as www.youtube.com . I usually store the remote $http\_response\_header + the object locally to reduce the latency and everything seems fine. I …

---

## [php script to update HTML file(s)](https://www.phphelp.com/t/php-script-to-update-html-file-s/21469)

<div class="topic-metadata">

**Author:** [@j.k](https://www.phphelp.com/u/j.k)\
**Replies:** 4\
**Last updated:** [November 6, 2013, 7:49pm UTC](https://www.phphelp.com/t/php-script-to-update-html-file-s/21469 "2013-11-06T19:49:27Z")

</div>

Are there some sort of php scripts. that way, I would only have to update one HTML file instead of 1000s which all locate in my web site. :slight\_smile: Thanks in advance

---

## [Parameter Problem](https://www.phphelp.com/t/parameter-problem/21439)

<div class="topic-metadata">

**Author:** [@tqmd1](https://www.phphelp.com/u/tqmd1)\
**Replies:** 1\
**Last updated:** [November 4, 2013, 6:01am UTC](https://www.phphelp.com/t/parameter-problem/21439 "2013-11-04T06:01:39Z")

</div>

Dear Sir, I have following codes \<?php mysql\_connect("localhost", "root", "") or die("Connection failed! " . mysql\_error()); mysql\_select\_db("asia"); echo "Connection successful!"; $find\_query = "select \*FROM ghee whe…

---

## [Search with multiply words](https://www.phphelp.com/t/search-with-multiply-words/21426)

<div class="topic-metadata">

**Author:** [@system](https://www.phphelp.com/u/system)\
**Replies:** 1\
**Last updated:** [November 3, 2013, 4:53pm UTC](https://www.phphelp.com/t/search-with-multiply-words/21426 "2013-11-03T16:53:18Z")

</div>

I’m about to update my search script. The search engine searches in my database where I ask it to search. What is new is I want do some search words, that the users can check in a checkbox, if he wants to use the word in…

---

## [directed page retrieve user\_id from login page](https://www.phphelp.com/t/directed-page-retrieve-user-id-from-login-page/21155)

<div class="topic-metadata">

**Author:** [@r1nk](https://www.phphelp.com/u/r1nk)\
**Replies:** 11\
**Last updated:** [September 24, 2013, 1:43pm UTC](https://www.phphelp.com/t/directed-page-retrieve-user-id-from-login-page/21155 "2013-09-24T13:43:30Z")

</div>

When a user login, he/she will be directed to the page based on his/her user type… I’ve already accomplished that. Now, how to make the page recognize the user\_id(auto-increment from user table) so that i can post some …

---

## [Basic Comment System available for Download](https://www.phphelp.com/t/basic-comment-system-available-for-download/20879)

<div class="topic-metadata">

**Author:** [@tanzeelniazi](https://www.phphelp.com/u/tanzeelniazi)\
**Replies:** 5\
**Last updated:** [August 18, 2013, 1:30pm UTC](https://www.phphelp.com/t/basic-comment-system-available-for-download/20879 "2013-08-18T13:30:40Z")

</div>

Hi there, First of all I am not an expert in the field (YET :wink: ) but I’ve created a comment system using PHP/MySQL from the things that I’ve learned so far. My aim was just to figure out how comment system works an…

---

## [Users hyperlinked URL in Profile](https://www.phphelp.com/t/users-hyperlinked-url-in-profile/20764)

<div class="topic-metadata">

**Author:** [@system](https://www.phphelp.com/u/system)\
**Replies:** 0\
**Last updated:** [July 29, 2013, 8:57am UTC](https://www.phphelp.com/t/users-hyperlinked-url-in-profile/20764 "2013-07-29T08:57:14Z")

</div>

Hi guys, How do I get users to input their own website URL into my website so that they can easily be linked to my website. Below is the little code which I am failing to get users to input their own website url. I can …

---

## [Return the Length of the longest word in sentence.](https://www.phphelp.com/t/return-the-length-of-the-longest-word-in-sentence/20613)

<div class="topic-metadata">

**Author:** [@Sensimillia](https://www.phphelp.com/u/Sensimillia)\
**Replies:** 0\
**Last updated:** [July 3, 2013, 6:38pm UTC](https://www.phphelp.com/t/return-the-length-of-the-longest-word-in-sentence/20613 "2013-07-03T18:38:44Z")

</div>

This functions can be used to prevent users from causing overflows with “words” of excessive length. \[php\] function longestWord($sentence){ $arr\_words = explode(" ",$sentence); foreach($arr\_words as $eWord){ $eLen =…

---

## [Downloading files from server](https://www.phphelp.com/t/downloading-files-from-server/20538)

<div class="topic-metadata">

**Author:** [@echris](https://www.phphelp.com/u/echris)\
**Replies:** 5\
**Last updated:** [June 27, 2013, 7:29pm UTC](https://www.phphelp.com/t/downloading-files-from-server/20538 "2013-06-27T19:29:05Z")

</div>

Hey! I’m currently working on a website for a client and I need a script that enable users to log in and download files from a server, the files does also need to be displayed on the website (once logged in) with filena…

---

## [Multiple Image Upload Class](https://www.phphelp.com/t/multiple-image-upload-class/20550)

<div class="topic-metadata">

**Author:** [@mdahlke](https://www.phphelp.com/u/mdahlke)\
**Replies:** 0\
**Last updated:** [June 25, 2013, 2:48pm UTC](https://www.phphelp.com/t/multiple-image-upload-class/20550 "2013-06-25T14:48:00Z")

</div>

I created a class to upload multiple images. It’s simple to use and I am open to feedback and in fact would love some. There is sufficient documentation in the ImageUploader.class.php https://github.com/mdahlke/Multip…

---

## [return $return](https://www.phphelp.com/t/return-return/20522)

<div class="topic-metadata">

**Author:** [@kutatishh](https://www.phphelp.com/u/kutatishh)\
**Replies:** 0\
**Last updated:** [June 21, 2013, 7:57am UTC](https://www.phphelp.com/t/return-return/20522 "2013-06-21T07:57:28Z")

</div>

Hello. I have the following error on a php site that i’ve moved to my local machine to troubleshoot. It was created by another developer and i’m still quite a novice, so need help. Using WAMP on windows 7 Error is: No…

---

## [php form validation.. ](https://www.phphelp.com/t/php-form-validation/20475)

<div class="topic-metadata">

**Author:** [@webdevdea](https://www.phphelp.com/u/webdevdea)\
**Replies:** 1\
**Last updated:** [June 19, 2013, 3:24pm UTC](https://www.phphelp.com/t/php-form-validation/20475 "2013-06-19T15:24:18Z")

</div>

I am trying to create a form that lets the user know if they didnt enter information when they hit the submit button. \[code\] Assignment2 What's your name? Writing a form for user input Please type y…

---

## [MOVED: phpexcel - Reading from one excel sheet, writing to another](https://www.phphelp.com/t/moved-phpexcel-reading-from-one-excel-sheet-writing-to-another/20384)

<div class="topic-metadata">

**Author:** [@richei](https://www.phphelp.com/u/richei)\
**Replies:** 0\
**Last updated:** [May 31, 2013, 1:00am UTC](https://www.phphelp.com/t/moved-phpexcel-reading-from-one-excel-sheet-writing-to-another/20384 "2013-05-31T01:00:31Z")

</div>

This topic has been moved to General PHP Help. \[iurl\]http://www.phphelp.com/forum/index.php?topic=20559.0\[/iurl\] \*\* Moved at user’s request.

---

## [MOVED: PHP script that displays categories and product images and name on same page](https://www.phphelp.com/t/moved-php-script-that-displays-categories-and-product-images-and-name-on-same-page/20371)

<div class="topic-metadata">

**Author:** [@sebrenauld](https://www.phphelp.com/u/sebrenauld)\
**Replies:** 0\
**Last updated:** [May 29, 2013, 4:02pm UTC](https://www.phphelp.com/t/moved-php-script-that-displays-categories-and-product-images-and-name-on-same-page/20371 "2013-05-29T16:02:55Z")

</div>

This topic has been moved to General PHP Help. \[iurl\]http://www.phphelp.com/forum/index.php?topic=20544.0\[/iurl\]

---

## [MOVED: File Renaming Conundrum](https://www.phphelp.com/t/moved-file-renaming-conundrum/20366)

<div class="topic-metadata">

**Author:** [@sebrenauld](https://www.phphelp.com/u/sebrenauld)\
**Replies:** 0\
**Last updated:** [May 28, 2013, 5:01pm UTC](https://www.phphelp.com/t/moved-file-renaming-conundrum/20366 "2013-05-28T17:01:18Z")

</div>

This topic has been moved to General PHP Help. \[iurl\]http://www.phphelp.com/forum/index.php?topic=20537.0\[/iurl\]

---

## [Google maps composite queries](https://www.phphelp.com/t/google-maps-composite-queries/20283)

<div class="topic-metadata">

**Author:** [@sebrenauld](https://www.phphelp.com/u/sebrenauld)\
**Replies:** 0\
**Last updated:** [May 16, 2013, 2:51pm UTC](https://www.phphelp.com/t/google-maps-composite-queries/20283 "2013-05-16T14:51:58Z")

</div>

This is a working code snippet in JS, but could easily be adapted to PHP. It serves as a tutorial into something called waterfall processing, or composite queries. The idea is pretty simple: Google places limits you to…

---

## [Capitalize only vowels in a string](https://www.phphelp.com/t/capitalize-only-vowels-in-a-string/19237)

<div class="topic-metadata">

**Author:** [@tuckerteague](https://www.phphelp.com/u/tuckerteague)\
**Replies:** 3\
**Last updated:** [May 14, 2013, 7:05am UTC](https://www.phphelp.com/t/capitalize-only-vowels-in-a-string/19237 "2013-05-14T07:05:44Z")

</div>

I’ve search this and kept coming up with how to capitalize a whole string, or first letter of a string, but what if I wanted to pick out the vowels (a,e,i,o,u) of a string and only capitalize those? Lets say the string …

---

## [Looking for some help](https://www.phphelp.com/t/looking-for-some-help/19937)

<div class="topic-metadata">

**Author:** [@brantonlj](https://www.phphelp.com/u/brantonlj)\
**Replies:** 1\
**Last updated:** [May 2, 2013, 10:27pm UTC](https://www.phphelp.com/t/looking-for-some-help/19937 "2013-05-02T22:27:04Z")

</div>

Okay so I have some code written in php basically all it does is make a captcha image make sure they match and email the form answers to my email. But something is wrong because the image will not show up, I dont know kn…

---

## [I have a line of code that has me going crazy Im a newbie need some help](https://www.phphelp.com/t/i-have-a-line-of-code-that-has-me-going-crazy-im-a-newbie-need-some-help/19976)

<div class="topic-metadata">

**Author:** [@kweli123](https://www.phphelp.com/u/kweli123)\
**Replies:** 1\
**Last updated:** [May 2, 2013, 1:16pm UTC](https://www.phphelp.com/t/i-have-a-line-of-code-that-has-me-going-crazy-im-a-newbie-need-some-help/19976 "2013-05-02T13:16:35Z")

</div>

For this partial code here \[php\]\<?php if(!(include LIBDIR . ‘mysql15.php’)) return 0; class MySQLu\_class extends MySQL1\_class {\[/php\] I get this error in my email Error #2048 ---------\> An error occurred in script…

---

## [is there anyone to help me about my code ???](https://www.phphelp.com/t/is-there-anyone-to-help-me-about-my-code/19382)

<div class="topic-metadata">

**Author:** [@redhat2](https://www.phphelp.com/u/redhat2)\
**Replies:** 2\
**Last updated:** [March 27, 2013, 3:08am UTC](https://www.phphelp.com/t/is-there-anyone-to-help-me-about-my-code/19382 "2013-03-27T03:08:58Z")

</div>

i have three page code in the following : index.php : \[php\]\<?php require\_once(‘includes/funcs.class.php’); $objectUser = new func(“localhost”,“root”,"",“mesaeed”); if(isset($\_POST\[‘username’\])) { $objectUser-\>exis…

---

## [Dynamic Buttons](https://www.phphelp.com/t/dynamic-buttons/19912)

<div class="topic-metadata">

**Author:** [@jPaul](https://www.phphelp.com/u/jPaul)\
**Replies:** 0\
**Last updated:** [March 25, 2013, 2:56am UTC](https://www.phphelp.com/t/dynamic-buttons/19912 "2013-03-25T02:56:55Z")

</div>

Hi everybody, I am trying to figure out my first PHP script, but have no idea how to logic it out. I hope someone will help me find the right logic pattern to do this the right way. It ought to be pretty simple… I can…

[Previous page](https://www.phphelp.com/c/code-snippets/11.md?page=1)

[Next page](https://www.phphelp.com/c/code-snippets/11.md?page=3)
