Jump to content

JonnoTheDev

Staff Alumni
  • Posts

    3,584
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by JonnoTheDev

  1. You should have an SMTP server address from your ISP also. You could use that.
  2. Not sure if this is possible without the actual remote file location. The remote script is obviously using a file header to prompt a download
  3. As long as ther is a mail transfer agent on the box you are doing the demo or use an SMTP server address. If the box has no internet access, then no.
  4. This could be a difficult task dependent on how you will display the data in the browser. You may need to set tags around each piece of data you are saving in the file so you can extract it correctly using string functions or regex. i.e. // text file [TITLE]This is the title[/TITLE] [bODY]This is the body[/bODY] The basics of this are to first validate the user input. Then store the data into a file using file(), fwrite(), etc. Retreiving the data may again involve the use of file() or file_get_contents(), etc Then you will need to break the file contents up into how you want to display it on screen. Maybe use some string functions to build up an array of the content parts in the text file.
  5. I find it better when using an ENUM field to use 1 & 2 rather that 0 & 1 as the code will see 0 as empty i.e. // $flag == 0 if(!$flag) { // display } // $flag == 1 else { dont display }
  6. You can either run 2 queries or use a foreign key constraint (you will need to alter the blog table) since you are using InnoDB tables. Read http://dev.mysql.com/doc/refman/5.0/en/innodb-foreign-key-constraints.html
  7. If forms are involved you will ned to use CURL for this.
  8. This means that $_SESSION['details']; is not an array when it should be.
  9. Is your form actually submitting? Can you print the user entered input to the screen after the form has been posted to test. Also your mail function is missing the mail headers. Check out the mail() function on php.net for a description of mail headers.
  10. This is incorrect. You do not implode in a loop $ilm = $_SESSION['details']; foreach($ilm as $value) { $str = implode(',' , $ilm); echo $str; } foreach($ilm as $value) { $insert="INSERT INTO dealerguide (ilmissue) VALUES ('$str')"; } mysql_query($insert); Should be $insert="INSERT INTO dealerguide (ilmissue) VALUES ('".implode(",",$_SESSION['details'])."')"; mysql_query($insert);
  11. If you have no experience writing bots then I recommend this book: http://nostarch.com/webbots.htm If you have no php experience then I suggest a beginners php book also.
  12. Are your mail headers correct? text/html
  13. The --with-xsl is when you are compiling php from source. If php is already compiled then your can either recompile (check with phpinfo(); to see what other modules have been included) or add the package with yum (linux): From the linux command line: yum install php-xsl Then restart apache
  14. Is session support enabled in your php configuration? Is you session save path correct?
  15. How can you suggest this guy can't do it. There has been no complete specification posted. You could make a simple app in a couple of days, easy!
  16. Has the user upgraded their web browser. Your javascript may be out of date.
  17. What do you need to know?
  18. The cookie needs to be stored in a directory that can be written to. You dont seem to have supplied a path i.e. curl_setopt($ch, CURLOPT_COOKIEJAR, "/tmp/cookie.txt"); curl_setopt($ch, CURLOPT_COOKIEFILE, "/tmp/cookie.txt"); So no cookie, no login!
  19. What happened to accessibility! Would you stop a blind person accessing your website from a speech based browser because they are not using IE 7 or the latest Firefox?
  20. All WHM functionality, creating accounts, dns records, subdomains, etc are basically done via perl files in the core of the system. The API will call on the files dependent on what you are doing i.e. createAcct() - create an account. If the API has no method for creating subdomains then you will need to extend the API to do this. Not sure what version of WHM it was at the time but I extended the API to allow more functionality via remote calls. This was for a webhosting company who used WHM servers for customer hosting that wanted to give the users more control over their hosting accounts via the company website and strip the functionality away from the cPanel system. You will need to research this yourself as its not a case of posting a bit of code here to make it work for you. At the time I dont think the documentation gave much info on the API itself so it was a case of figuring it out.
  21. Look at the original regex that started the post off kratsg!
  22. Here is a description of your original regex: Part 1: [] Match a single character in the range between A and Z Match a single character in the range between a and z Part 2: [] Match a character in the list below between 0 and 70 times, as many times as possible, without giving back (possessive) Match a single character in the range between A and Z Match a single character in the range between a and z Match a single character in the range between 0 and 9
  23. The best way to stop multiple records being inserted on a page refresh is to reload the page after the insert query has run so: // insert the record mysql_query(""); // redirect the user header("Location:page.php?booking=true"); Then you can check for the $_GET['booking'] and display the user success message
×
×
  • 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.