Jump to content

upp

Members
  • Posts

    31
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

upp's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. <?php $input_value = 'a tall order'; if ( $input_value == 'a tall order' ) { echo 'Correct!'; } if ( $input_value = 'err on the side of caution' ) { echo 'correct!'; } else { echo 'Sorry, try again.'; } ?>
  2. to be honest i have never worked with foreign languages, but after looking into a couple things i think this is worth a shot, see if urldecode() works for you, let me know if it does or not, you can read about what it does here http://php.net/manual/en/function.urldecode.php
  3. you can use the mail() function to send SMS messages, all you will need to know is the email address that the cell phone company uses to receive SMS messages, for example sprint uses messaging.sprintpcs.com att uses txt.att.net so if i was sending a message to a sprint phone i would use this code: <?php $number = '18001234567'; // enter phone number here $message = 'enter your message here'; mail($number . '@messaging.sprintpcs.com', 'SMS', $message); ?>
  4. what does $facebook->api('/me/friends') return?
  5. you could use strlen() to get the number of numbers in the string, then calculate where the middle 5 would be and use substr() to get the 5 numbers in the middle
  6. I need some advice, I'm not sure if this is the right section to post this or not but I'll give it a try. I am creating a website for a small group of people to be able to message back and forth. I ran into a problem when doing the whole reply to a message option. I dont want to have each individual message as a new entry in my database, and then look for each message in that conversation when loading the conversation, I thought about inserting something like +=+=+=+=+=+= in between messages in the conversation so that when i pull up that conversation i could just separate the messages into an array by looking for that +=+=+=+=+=+= in the string of text and separating all the messages out. I want to know if anyone knows a better way of doing this or if this is a good way to go. thanks for any suggestions.
  7. so you want a page that displays only the make that was clicked right? if so, you can use $_GET to pass the make that was clicked, so that when http://sts.hostei.com/dsgi/list_records.php?make=hp is loaded, run this sql: "SELECT make, COUNT(*) AS total, SUM(IF(comments = \'pass\', 1, 0)) AS withComments FROM dsgi_serval WHERE make = '. $_GET['make'] ."GROUP BY make ORDER BY COUNT(*) DESC" this is just a simple example, of course you want to use something like htmlspecialchars on the $_GET variable before you run your sql
  8. its a pretty plain site, but as far as programming you could add a contact form to your contact page so that the user could email you from there, this could be done easily with PHP and theres plenty of tutorials out there that could show you how to accomplish this.
  9. if you want someone to build this for you, you can check the freelance section, or if you want to try it out yourself and run into some problems then post your issues and im sure someone will help you out
  10. i cant find where $pid and $aid are established in your script, and also on this part of the script: $paginationDisplay .= ' <a href="' . $_SERVER['PHP_SELF'] . '?pn=' . $nextPage . '"> Next</a> '; change that to: $paginationDisplay .= ' <a href="' . $_SERVER['PHP_SELF'] . '?pn=' . $nextPage . '&ID='. $id .'&aid='. $aid. '"> Next</a> '; so that id and aid are passing into the next page using $_GET
  11. using the function similar_text you can get the percentage of how similar the two blog entries are to each other, if you want to see the differences, i found a tutorial on how to do it. http://www.weberdev.com/get_example-4323.html
  12. you could generate random numbers between certain values for certain regions. example region a will have numbers between 10000000000000 and 19999999999999, region b will have a random number between 20000000000000 and 29999999999999, and so on.... then you could apply a switch and figure out what region they are in. example: $region = "north"; // put the region of the user here switch($region){ case "north": $pin = rand(10000000000000, 19999999999999); break; case "south": $pin = rand(20000000000000, 29999999999999); break; } switch($pin){ case ($pin >= 10000000000000 && $pin <= 19999999999999): echo "you are in the north"; break; case ($pin >= 20000000000000 && $pin <= 29999999999999): echo "you are in the south"; break; }
  13. hello guys, im creating a search result page that uses pagination, and im trying to figure out how many total pages their are going to be in my links with the page numbers. this is probably something really simple, ive been writing scripts for the last few hours and have a bit of a headache, any help would be appreciated here's the coding and the results i want: <?php $per_page = 10; $rows = mysql_query("SELECT COUNT(*) FROM articles WHERE text LIKE $string"); // this will return 31 $pages = $rows / $per_page; // returns 3.1 $total_pages = round($pages); // returns 3, want to round 3.1 up to 4 here ?>
  14. does getimagesize() return anything? if it returns a low value you could tell your script only to display the image if its over a certain value
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.