Jump to content

jcbones

Staff Alumni
  • Posts

    2,653
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by jcbones

  1. Look in the php.ini and make sure that: ; The path for which the cookie is valid. ; http://php.net/session.cookie-path session.cookie_path = / ; The domain for which the cookie is valid. ; http://php.net/session.cookie-domain session.cookie_domain =
  2. You need to give more info. Start with a code snippet of what you have. Next we need some idea as to what the calculation is (ie. the math involved).
  3. print it out, and see what it looks like: echo '<pre>' . print_r($mail_arr,true) . '</pre>';
  4. For the header issue look: Here
  5. Over there ->
  6. Glad to help, please click the solved button over -> there!
  7. The reason you get a black background is that jpeg doesn't support transparent images like PNG does. You are making all of your images jpg's with the latest code. SimpleImage is a great class and I have used it before. Your code only needed one line changed to make it work. <?php //this line: //Try to upload it. if(!move_uploaded_file($_FILES['uploaded']['tmp_name'], $newfilename)) //to this line: //Try to upload it. if(!$image->save($newfilename,$image->image_type))
  8. If you use 'range' as a column name you must surround it in backticks, as it is a reserved word in mysql. You have done that in the second query's WHERE clause, but NOT in the select clause. $sql="SELECT distinct `range` from `linksurv_field_notes` WHERE `range`!='' ORDER BY `range` DESC"; When searching for MySQL errors, look at the exact point that the output starts. You will notice that it started with the word range in the second query. rg sel:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'range) from `linksurv_field_notes` WHERE `range`!='' order by `range`' at line 1
  9. I'm going to take a stab at this, even though I am a little foggy on the database structure. "SELECT u.userid, u.username, u.laston, n.userid AS referredid, n.username AS referredusername, n.laston AS referredlaston, r.* FROM users AS u JOIN referals AS r JOIN users AS n ON r.refREFER=u.userid AND r.refREFED=n.userid WHERE r.refREFERIP=r.refREFEDIP ORDER BY userid" JOIN each and every row in the first table is joined to each and every row in the second table. If there is no matching row for the right table in the ON or USING part in a LEFT JOIN, a row with all columns set to NULL is used for the right table.
  10. Should be what you need. <?php $sel = "SELECT * FROM brugergruppe WHERE "; if(!empty($postnummer)) $where[] = "postnummer = '$postnummer' "; if(!empty($town)) $where[] = "town = '$town'"; if(!empty($koen)) $where[] = "koen = '$koen'"; if (!empty($region)) $where[] = "region = '$region'"; if(!empty($alder1) && !empty($alder2)) $where[] = "alder BETWEEN '$alder1' AND '$alder2'"; $sel .= implode(' AND ',$where); $sel .= " ORDER BY id"; echo $sel; ?>
  11. If you installed WAMP SERVER then the public HTML folder is called 'www'. You will have to configure MySQL to work with php, by moving a file, it should be in the readme that pops up after installation. http://www.wampserver.com/en/presentation.php Their forums you have already found, I see!
  12. Where is your links built, because cid seems to be holding the category id and the id.
  13. OK, post your code: from 5 lines above the error, to 5 lines below the error.
  14. My suggestion would be to have a script on the remote server that accepted a POST, and then write to the file on its own server.
  15. Why? if it were easier, then every kiddie on the interwebz would be changing all of your files!
  16. Are you locking the table for any reason?
  17. test.txt 1 2 3 4 test.php <?php //get file into an array. $line_of_text = file('test.txt'); foreach($line_of_text as $lineNumber => $line) { echo '<br />Line ' . $lineNumber . ' of the array is <br /> ' . $line; // displays the contents of the array in a print message } echo '<br /><br />You have reached the end of the file!'; ?> Output Line 0 of the array is 1 Line 1 of the array is 2 Line 2 of the array is 3 Line 3 of the array is 4 You have reached the end of the file!
  18. Well, I would counter that a good editor will automatically display all the variables used in a script. True, but I didn't say a good editor, I just said one that would support regular expressions.
  19. OH, contrary to what you believe, the first line in an array is 0. Ironically, that is the first number in math as well. Post the contents of this test file.
  20. You are NOT sending the table name in your POST data. IF you echo'd the query like suggested, you would find it reads: SELECT * FROM `` ORDER BY RAND() LIMIT 100 Then MySQL rejects it, you get a mysql_fetch_assoc() error (Which always means that your query failed), and a mysql error.
  21. Get an editor that will do regular expression matching, and search for this: \$[^\s);]+
  22. You should be able to do this: <?php //get file into an array. $line_of_text = file('ArrayTestFile.txt'); foreach($line_of_text as $lineNumber => $line) { $line_parts = explode(';',$line); echo 'Line ' . $lineNumber . ' of the array is <br /> ' . implode('<br /> ',$line_parts); // displays the contents of the array in a print message } echo '<br /><br />You have reached the end of the file!'; ?>
  23. Have you tried using the readfile() function? I don't think it would be parse, but I could be wrong.
  24. //need something here to have it send the post data to /mcbuildapp/form_submit.php //add this line: include('mcbuildapp/form_submit.php');
  25. The header() function cannot be used after output has been sent to browser. This includes any HTML outside of PHP, and whitespace outside of PHP, or any echo, print, print_r, etc. (any function or construct that outputs to the page, including errors, notices, etc.).
×
×
  • 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.