Jump to content

NLCJ

Members
  • Posts

    129
  • Joined

  • Last visited

    Never

Everything posted by NLCJ

  1. Nevermind, already found a much bigger mistake. There's no other option than start over with the project...
  2. Hello, I made a mistake some days ago, which causes to incorrect data. So I need to insert some rows between the data, this will work if I can get the specific data from that table into an array. I got it like: ID - Date - Username - Value1 Is it possible to put every row in an array, and then in this way that when I say: print $row[2010-10-05]; I've got an idea but that would take hours to create, so I was wondering if it's possible to do it in this way. Regards,
  3. Dumb me... I should have thought of that! Used it many times before. Thanks!
  4. Thanks for your reply, my problem isn't the reading of the array. I will try to explain. Currently the result is: 2010-10-01 2010-10-02 2010-10-03 I would like it to be like: 2010-10-03 2010-10-02 2010-10-01 So the array has to be 'reversed' somehow.
  5. Hello, I've created a little script that fetches all dates from the database and puts it into a select list. The problem is that the today date is at the bottom, so a lot of scrolling to do if you need that date. That's why I need it reversed. I got this: while($d_dailystatistics = mysql_fetch_array($d_getdailystatistics)) { And here I'm stuck, I've tried to use array_reverse, with no result. Googling wasn't really helping either and W3Schools is offline for me (I know it's on, just a provider issue). Thanks, NLCJ
  6. Thanks a lot! (Both of you)
  7. Just a typo I saw when I took a quick look at it, you have </boby> instead of </body>.
  8. Hello, I've been struggling for days on this problem now. And I'm getting frustrated! I know that the answer is simple, and I've done it before but I cannot figure out what I'm doing wrong. What do I want? Well, I get a date from the database in this format: YYYY-MM-DD. I first want to distract one month from that and then set in into this form: YYYY, MM, DD. I've got this but it's not working (I've tried a lot different values). $transformdate = date("Y-m-d", strtotime("-1 month", $d_datevalue)); $startpoint = str_replace("-", ", ", $transformdate); Thanks, NLCJ
  9. Try the second one, and if that's not what you want, use the first one.
  10. Thanks a lot, really! This took me about 9 hours of searching before I figured out that there is an invisible character! Once again thanks!
  11. I might have a clue, I think it's the 'invisible character'... What dumbass invented that?!
  12. Doesn't work, somehow there is an 'enter' but I'm not able to explode it...
  13. This is in the source code if I print it: 0.68 I've got no idea what it is?! It isn't a <br> or a space or a \r\n... Maybe important: I fetch the information using cURL.
  14. First, if users go directly to the mysql_connect.php they will get a blank page since the script doesn't return any information. Second, why can't you use incude('fileyouwant.php'); into your script, they won't be able to see what file you've included...
  15. Hello, I've been working on some stuff, and get the information parsed like this: Value1,Value2,Value3 0.68,4377.54,11069.02 So I'm trying to explode it and insert the latest numbers into the database. I'm using: $value = explode(",", $variable); $secondsplit = explode(" ", $value[2]); mysql_query("INSERT INTO table(row) VALUES('".mysql_real_escape_string($secondsplit[1])."')"); The problem is that it has something like an enter in the database, or a space. But I can't figure out how to get rid of that problem. Does anyone know what's wrong? Regards, NLCJ
  16. Try to explain it more. And give details! We're all trying to help you but no-one understands you... Does the site that you want to have in your PHP script stay at a different server, or your server? What does it do and WHAT do you want to achieve. We know that you want to hide something, but have no idea what. If you mean that they can't see the file when you include it: No they can't, PHP is a server-side language so it makes the whole page at the server and then parses it to the user. Have you ever thought about TRYING any of those suggestions? And then look for yourself if it is the thing that YOU want?! We can keep giving suggestions while we don't know what you want, but in this way we get frustrated and you won't get your answer. Try something...
  17. $url = curl_init("yoururl"); curl_exec($url); curl_close($url);
  18. Hello, I fetch information from an URL, and this is the output I get using cURL (there's no other way I can get it): Now I want to explode this, but I can't directly explode this using explode. How do I do this? Once I use curl_exec it is always displayed. Regards, NLCJ
  19. I've solved it, I suddenly thought of the solution. Weird! I've used: $postedinfo = explode("\r\n", $_POST['information']); To get the information, then it can be requested by using: echo $postedinfo[0] For line 1, and echo $postedinfo[1] For line 2 etc.
  20. No! The thing is that there's only going to be one user - me. It's not going to be some multi user platform, just a simple one password form for me! Maybe .htaccess is something for you in that case?
  21. Hello, I've got two questions. Users can fill in a form with information that has to be in the following format: Value 1,Value 2,Value 3,Value 4 Value 1,Value 2,Value 3,Value 4 Now I want to return an error if ANY line isn't in that format. For example when it's like this: Value 1,Value 2,Value 3,Value 4 Value 1,Value 3,Value 4 I've got no clue how to do that... The second question is, how can I get a specific line of the posted information? I've already gotten an answer on how to count those lines, which is working. But I'm going to insert them into the database using a for loop, so I need to insert one row at a time. Thanks for your time and help, Chris
  22. Hello, Users can export information and paste it into a field at my site, this field will be formatted like: VALUE1,VALUE2,VALUE3,VALUE4 VALUE1,VALUE... I've gotten an answer on how-to count the lines, and I was thinking about doing it using a for loop, but somewhere in the past week I read something about BULK INSERT. I cannot find this anymore, and Google isn't helping. Does anyone know how to do this? And is it possible to run a check over it then? Regards, NLCJ
×
×
  • 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.