Jump to content

JonnoTheDev

Staff Alumni
  • Posts

    3,584
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by JonnoTheDev

  1. $_SESSION['varibleName'] = $_POST['variableName']; replace variableName for whatever post value you want in your session and remember to include session_start() at the top of every file using sessions.
  2. Doesnt really matter if on same host because you are using a URL rather than a filepath. If URL file opening is allowed on your server you can use: $handle = fopen($row['picgal'], "r"); while (!feof($handle)) { $contents .= fread($handle, 8192); } fclose($handle); echo $contents; Other than that you can use a standard include(); so: include($row['picgal']); If fopen on URLS is not allowed then you would need to use CURL http://uk2.php.net/manual/en/book.curl.php
  3. All you need is: if(!strlen($trimmed['gender'])) { // no gender selected - display error }
  4. You mean grab the contents of the page from the external link?
  5. Also the way you are tackling this there is no requirement for a class. A general function would be more efficient on its own function make_form($form_title,$form_name,$action,$form_elements_array){ echo "<form name=$form_name action=$action>\n"; echo "<table><tr><td><h3>$form_title</h3></td></tr>\n"; foreach($form_elements_array as $val){ $element=$val."_form"; echo "<tr><td>$val</td><td><input name=$val</td></tr>\n"; } echo "<tr><td colspan=2><input type='submit'></td></tr>\n"; echo "</table></form>\n"; } will do
  6. You are not setting the class variables and referencing them with $this. You can either add a constructor method or remove $this in your make_form method so: option 1 public function __ construct($form_title,$form_name,$action,$form_elements_array){ $this->form_title = $form_title; // rest of vars } or in you make_form method change the foreach to foreach($form_elements_array as $val){ } You do not need the member variables if you use option 2 so the following can be removed: private $input_name,$input_type,$form_name,$input_title,$form_title,$form_elements;
  7. $_POST['client']; or $_POST['user'];
  8. You can simply use the file_get_contents() function to grab the feed and then add some parsing code to format it or use an existing class like http://www.phpclasses.org/browse/package/1820.html
  9. I think this maybe possible if you are using the Skype service
  10. Tell her to take a look at this http://www.nads.org.uk/clubs.php This is a website I developed to promote the disabled facilities of football (soccer) clubs in the UK. Click on any of the clubs and then click the Getting There link near the top. i.e. http://www.nads.org.uk/portsmouth-fc/fratton-park/location/32.html http://www.nads.org.uk/arsenal/emirates-stadium/location/2.html This uses the Google API and they know exactly how much usage we have of the maps because the key they give you works only on the specified domain. We have 0 issues with any websites using maps.
  11. class myClass { public $i; public function __construct() { $this->i = 5; } public function i() { // method code return 2; } } $x = new myClass(); // will set $y to 5 $y = $x->i; // will set $y to 2 $y = $x->i(); See the differences above. The first is a ref to a class variable. The second is a class method
  12. What the hell? This is an example: $subject = "I am a good boy 34."; preg_match('/([0-9]+)/', $subject, $match); It obviously needs to be modified so each line that is read in from the file is passed into the regex to extract the number. $subject is used as an example
  13. Incorrect. Use: $subject = "I am a good boy 34."; preg_match('/([0-9]+)/', $subject, $match); echo $match[1];
  14. Not really - where did you get that idea
  15. Why? Its basic SQL syntax
  16. Rather than using a * in your SELECT statement (which is everything), only select the fields you want to return. SELECT field1, field2 FROM.....
  17. Use the Google Maps API if it is a commercial website (generate a map API key) rather than URL links and tell your boss to fook off!
  18. You are better redirecting the user to a success page with a header command after the email has been sent header("Location: successpage.php"); If you add HTML under the mail() function and the user hits refresh then the email with get set again, and again, and again........
  19. You will have to modify the database (if your results are from a database) query to only get you the number of results based on the page parameter i.e. mypage.php?page=x What has XML got to do with pagination?
  20. To be honest it doesnt matter if the key is decrypted. It is only used to perform a database lookup. You are only generating a unique key per user to be attached to a url param. You could create it from the current time: $userKey = md5(time()); Decrypting it would give you nothing secret!
  21. Your post doesnt really make sense. Are you trying to extract the first line of the file i.e Or the numeric value within the first line i.e. 23 or something else?
  22. Then you need to post in Third Party Scripts or get support from PHPFox. You probably won't find help here.
  23. What Mail Agent? How are you sending emails?
  24. Bad syntax. Should be: header("Location: mypage.php");
×
×
  • 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.