Jump to content

Petrucho

Members
  • Posts

    41
  • Joined

  • Last visited

Everything posted by Petrucho

  1. Problem fixed! Ingolme, dsonesuk - thank you both for the kind assistance! I used netBeans as my editor and only for this example, I've tried Notepad. As I said, I have no code in the test.php file. only the 3 lines of code I wrote which are the opening php tag, closing tag and in the middle, the session_start(); function. After googling about BOM, I've decided to install Notepad++ (version 6.9.2) which gives you the option of saving the file without the BOM. Problem got fixed. For someone who bumped into this thread in the future: It seems the only problem was indeed, the BOM as Ingolme has explained. Notepad++ gives you the option to save without BOM. (under Encoding->Encode in UTF-8 without BOM) In addition, not just that the BOM character sent to the output, but also could cause (at least to Google Chrome) a not welcoming space at the top of the page. First time I'm experiencing this. also the first time I'm using JetBrains for php coding. Thanks again!
  2. the only lines of code in the .php file I've created are: <?php session_start(); ?> No, this file is not included. I've created this file, just to check if I still get the warning, and yes, I do. It doesn't make any sense and that's why I came here. What else could send something to the buffer? maybe settings of the server? php.ini configuration? I can't find any solution and yes, I think, something's adding the <br /> prior to the session_start(); which makes it impossible to send any headers. Edit: Maybe this would help; Link to test.php: link Code of test.php as mentioned above (on this comment)
  3. I guess this is the source of the problem. the escaped <br /> As I mentioned earlier, I opened a new .php file (using Windows Notepad [saved in UTF8]) and written nothing but the session_start(); It's really confusing
  4. Hi dsonesuk, Yes, I've saved it as UTF8 encoded. When I try to open the .php page, I find an extra at the top of View Source. I have no clue, where did it come from.
  5. Hi, I had to use Session cookies for a little web application I'm working on, but I can't find solution to the problem mentioned above. I get the warning: This warning points to line 1. I've tried to create a new .php file, with the following code: <?php session_start(); ?> Only 3 lines of code, using nothing but Windows Notepad and I still get the same warning. I've tried to find solutions but couldn't find any in here, nor in Google. The only explanation I could think of, is a server problem who send headers in each call. It doesn't make any sense though. Someone ever experienced this? Any thoughts of how to fix this? Thanks in advance, Petrucho.
  6. It has to be something with your php version or configuration. I have just tried the code on my server. output: Try the function phpinfo();
  7. This code should work. What you see in your browser while trying to load the page? it show's you anything?
  8. "TEXT and CHAR or nchar that will typically be converted to plain text so you can only store text like strings. BLOB and BINARY which mean you can store binary data such as images simply store bytes." Here
  9. DB's save textual data, not videos/imgs. You can save the path to your files, on your DB table though.
  10. I don't understand why you use the INSERT INTO SELECT statement. You have the value from your html form and you can use: INSERT INTO(..) VALUES(..)
  11. I'm not sure why you need it, but, time() return how many seconds have passed since January 1 1970 00:00:00 GMT. If you want to know how many days have passed since a particular time() you saved before, then you should subtract the time() you saved earlier, from the the time() now. Then a little math: 60 seconds = 1 minute 60 minutes = 1 hour 24 hours = 1 day
  12. After changing the folder chmod, you have no reason to keep using the chmod() in your code. Remove it, then it should work the way you wanted.
  13. I'm not sure if it's possible to fix it through PHP or not, but you can try change the chmod with your FTP-CLIENT. For instance, if you use FlashFXP, right click on the folder -> Attributes (CHMOD) -> *your setting*.
  14. Is it possible to change my username somehow? I searched the Setting-page and found nothing. Thanks in advance,
  15. You don't CLICK Checkbox's, you CHECK them. Look here for more information regarding the :checked selector.
  16. Petrucho

    foreach() error

    I guess now you understand the problem. What are you expecting $imgs to hold? where you initialize this variable??
  17. Petrucho

    foreach() error

    Seems something wrong with the argument you send for your first foreach. try to use <?phpdie(var_dump($imgs));?> before the foreach(); and post here the output it returns
  18. This is Jquery syntax. Jquery is an API of JS. w3schools tutorial for Jquery
  19. It won't be effective to use loops in your case. Initialize your vars with particular data and do the math.
  20. Try to add to insertJobs.php at line 1, the code below <? die($_POST[clientid]) ?> I guess it will be helpful to debug and find where is the problem, first of all, by checking your passed variables. It seems you don't send any var named "clientid". your SELECT name is "name".
  21. If your only purpose is to implement a "header"-file in multiple pages, I would suggest you to read: http://www.php.net/manual/en/language.basic-syntax.phptags.php http://il1.php.net/manual/en/function.include.php All you need to know: your server have to support PHP! In each page you choose to use php-script, you have to save the file as ".php" All you need to do: open php-script tag, add the include statement, close your php-script tag. 3 lined of simple code and you're done. No need to cover all the php documentation, for just "including" a single file in few pages.
  22. Hi! Not new to w3schools nor this forum. Came back after few years offline! 25 years old from Israel.
  23. I got to this page in the Jquery documentation: https://api.jquery.com/jQuery.each/ Thanks for the help, the idea is clear to me now.
  24. I have "Checkbox" input with multiple values. <input type="checkbox" name="drug" value="1" /><input type="checkbox" name="drug" value="2" /><input type="checkbox" name="drug" value="3" /> I want to run through this array and alert() all the values. I'm guessing I should use Jquery's .each() command but I'm not sure how to use it. the problem is, I don't understand how to use it so I can get the key and it's value. $.each($("input[name='drug']"),function(i,v){ alert(i+": "+v);}); What am I missing in the main idea?
×
×
  • Create New...