Jump to content

mikesta707

Staff Alumni
  • Posts

    2,965
  • Joined

  • Last visited

Everything posted by mikesta707

  1. can you just post the relevant code, there are a lot of lines there... but from skimming through, it doesn't look like you ever create a variable $uploadEND. try mysql_query("INSERT INTO tickets VALUES (NULL,'$username','$subject','$summary', '$status', '$progress', '$issue', '$replied','$upload')") or die (mysql_error());
  2. yes it does. your table seems fine. what happens when you do a var_dump of $uploadEND right before the query takes place?
  3. you can't do that. Firstly, you are acting as if writing javascript will return the value you wrote. Also, javascript and PHP can't talk to each other. all width has in it is a string with javascript tags and a javasript command, but the PHP can't execute the javascript. casting it as an int wont work either because its a string, and strings always get cast to 0 unless they are integral strings (IE "42", '27', etc.) you can put that value into a post variable, or get variable via javascript, but you won't be able to just access that value
  4. the structure of your table? IE what fields are what, what types are they, what is the primary key? etc.
  5. if you are using a header, you have to do the header before any output. that means before an HTML tags, so whereever your header is, put it at the top of the page
  6. $array[0][0]->id i think that would be it
  7. try trim($ipfile[$x]).$pageid
  8. try putting single quotes around the values
  9. $ipfile[$x].$pageid try that? maybe post your code. for some reason you are concatenating a space onto the end of the ip address, etween the $pageid and the ip
  10. your gonna want to use the mail() function
  11. thats because you are using intval its taking what it thinks is some crazy double and casting it as an int. don't use int val and try again
  12. what is $pageid? i never see it defined anywhere in that script. btw you want your for loop to have x < $linecount, because since arrays are zero based, once you hit the actual value of line count, (say its 5) you will get an array index that is out of bounds (or in PHP, it will be a null value, i believe) for example, say you have an array with a length of 5, it will look like 0 : value 1 : value 2 : value 3 : value 4 : value if you try to pass an index of 5 into that array, there will be no value for it
  13. I don't believe MYSQL supports the decrement/increment operators like most programming languages do.
  14. try doing this $line = system("flac -d dancing.flac", $returned); echo "Line : " . $line . "<br />"; echo "Return value: " . $returned . "<br />"; and see if you get an error message or any return value
  15. How does it not work? do you get an error? invalid command? what happens when you write that?
  16. mysql_query("UPDATE Mail_Usage set E_Mails=E_Mails + 1 WHERE Date='$DATE'"); I believe that will do that trick
  17. Well, every time a process is invoked I would suggest updating the database (which I assume you do) but also checking the database to make sure there aren't the maximum amount of processes. If there are, then don't let them do the process. If you are going to be using a table, I don't really see another way to make sure that you don't get an overload of processes. Plus, the table won't really be out of date for the specific query, as long as the table gets updated whenever it needs to
  18. what is the structure of your table? do a var dump on your $uploadEND variable, and make sure you aren't doing any assignments to it between when you define its value and use it in the query (IE make sure if you have a comparison, like if ($uploadEND == "whatever") its not if ($uploadEND = "whatever") or anything like that.
  19. I don't believe so. a textarea is basically a tiny version of a text editor (a very simple text editor) and so you can only edit the text as plain text. not to mention that highlight_string() returns your string with style tags around it for example the following <html> <body> <?php highlight_string("Hello world! <?php phpinfo(); ?>"); ?> </body> </html> would return <html> <body> <code> <span style="color: #000000">Hello world! <span style="color: #0000BB"><?php phpinfo</span> <span style="color: #007700">(); </span> <span style="color: #0000BB">?></span> </span> </code> </body> </html>
  20. I don't believe what you are trying to do is possible, but I am not entirely sure what you are trying to do. post your code please
  21. Why can't you modify the source? You could make the links go to the delete page (obviously, have an onclick attribute for your popup) and pass the filename as a get variable. for example, a link may look like this <a href="delete.php?page=Installation_Guide_for_Apache_2.2.13.pdf">Installation_Guide_for_Apache_2.2.13.pdf</a>
  22. $query = mysql_query("SELECT e_mails FROM mail_useage WHERE date='".date("Y-m-d", TIME() - 18000)."'"); really all i did was copy your string and paste it inside the mysql_query parameter...
  23. pass the filename as a post variable? if necessary pass the folder path relative to the script itself also, but you only really need to do that if the the files that want to be deleted exist in different directories. The confirmation popup can be done with javascript.
  24. you could make both those columns unique in your table. Or you can do a query to check, and if no rows are returned (IE no duplicates) than do the query. if not, don't.
×
×
  • 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.