Jump to content

upp

Members
  • Posts

    31
  • Joined

  • Last visited

    Never

Everything posted by upp

  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
  15. that second link you provided didnt work, what exactly are you trying to do?
  16. you could put those values in an array and use the str_replace function, example: $array = array('apple', 'orange', 'grapes banana'); $replace = '+'; // put what you want to put in the space here, example is a plus sign $new = str_replace(' ', $replace, $array); echo $new;
  17. is this what you are looking for? http://www.alt-php-faq.org/local/86/
  18. you would probably have to do this using AJAX. set a timer so that after x amount of time a php script is ran that updates the users status as offline
  19. I searched for this issue on the search on this site but couldnt find a solution. I currently do not have a hosting plan but am creating most of my files on my computer so that when I get my hosting plan I can have my website fully functional almost immediately. When I load my template on my firefox browser my template works fine, but when I load it in Internet Explorer it does not. The IE is preventing my javascript from loading, and then asks me to let the page run the javascript, obviously I could simply activate it, but what I'm worried about is the users that for whatever reason do not active it. my javascript will not load and simple things like the drop down menu will not work properly. I know that when I go onto other websites with my IE it does not give me the message asking me to allow the javascript even though the website is using javascript, is this simply because IE will not allow javascript to run on a page that is being ran from my desktop? or is there anything special I have to do to activate the javascript in IE through my coding? I'm hoping it simply needs to be on an actual server for IE to run the javascript, but if its something else I need to do I hope to catch it now so that I can start debugging that now as oppose to later on when users are not being allowed to fully use my website because of the javascript error. Any help would be greatly appreciated!
  20. i do believe getimagesize() works with full url's as well, have you tried getimagesize("http://www.example.com/image.jpg");
  21. are you looking for a pre-made script or help writing a script? pre-made scripts: http://www.google.com/#sclient=psy&hl=en&safe=off&q=php+star+rating+script&aq=1&aqi=g3g-m1&aql=&oq=php+star+rating&gs_rfai=&pbx=1&fp=5ddd74dd827ab059 tutorials: http://www.google.com/#sclient=psy&hl=en&safe=off&q=php+star+rating+tutorial&aq=0&aqi=g1g-o1&aql=&oq=php+star+rating+tutori&gs_rfai=&pbx=1&fp=5ddd74dd827ab059
  22. thank you for the information, ill look into computer science and into the zend certification
  23. overall the website looks to be in pretty good shape. when I clicked the register page on the menu it just took me to the login page and then I had to click another link to take me to tenant_register.php so im not really sure what the purpose behind that is. in http://www.yourhomely.co.uk/read_news.php?nid=5 it states that I can upload a video or sign up but doesnt have a link to do either one so you might want to throw in a link to video uploads and registering as a landlord to make it a little more user friendly. another small thing you might want to do is make it so when they click the image on the top that says your homely. homing the public make it so it links to the home page. Once again I went to the landlords.php page and it says if i want to register as a landlord i "click here" and that takes me to register.php which from there i have to go to another link to register as a landlord, why not just have the register page in landlord.php? these are minor fixes but other than that the actual design of the site looks pretty well done, nice job
×
×
  • 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.