Jump to content

scootstah

Staff Alumni
  • Posts

    3,858
  • Joined

  • Last visited

  • Days Won

    29

Everything posted by scootstah

  1. If I fudge some data in, your script works for me. Did you try looking at the page source to see if you have some weird HTML?
  2. Your solution is not secure. Anyone that stumbles across that directory would be able to download the file. You can use PHP to send a Content-Disposition header (and some other headers) which will "force" a file download. Since it's through PHP, you can validate the request and make sure the user is allowed to have the file. Google "PHP force download". EDIT: You should store the files on the server, but you can keep a file pointer in the database.
  3. The full template code, for the list view.
  4. The easiest way with Javascript would be to return both templates with PHP, in a containing element, and then show/hide them on a click event. <div id="grid"> grid template here </div> <div id="list"> list template here </div>But, that's pretty inefficient, since you're doubling the amount of data you're returning to the browser. Another way is to return JSON or something, and format it into your templates with Javascript. If you don't want to use Javascript, your PHP logic is basically as such: $view = 'grid'; if (isset($_GET['view'])) { $view = $_GET['view']; } if ($view == 'grid') { // return grid template } else { // return list template }
  5. To do it without a page reload will require Javascript. Otherwise, your PHP logic would basically just check which view was clicked and display the corresponding template. You could differentiate with a querystring variable.
  6. Do you mean create a PDF with PHP? Yes, that is possible. See the PECL PDF extension here: http://php.net/manual/en/book.pdf.php
  7. MySQL Workbench works fine in Windows, but it's a heap of crap in Ubuntu. You can't select multiple data rows, it's slow, it crashes every 5 minutes... Is there a good alternative? I like the functionality and features that MySQL Workbench offers, but I need something a bit more stable. The features I'm looking for are: - Connect via SSH Tunnel - A nice query executor - Able to save SQL snippets (not so important, but nice) What do you guys use?
  8. You should take a screenshot of your everyday setup.
  9. Have you tried an IDE? I used to think a simple text editor was all I needed too, but then I tried an IDE. The only time I use a regular text editor now is just for real quick edits, or stuff that I don't want to make into a project in my IDE. IDE's tend to get in my way. Yeah, that's how I felt too. I have my Eclipse setup to be pretty minimal though. For example, the annoying help box that pops up with every keystroke is disabled. It only pops up if I want it to by hitting ctrl+space. Most of the time it is unneeded, though sometimes I need it to remember which order parameters go in in a function (since PHP seems to make that as illogical as possible). I mostly like it for automatic bracket/quote closing. I like the way Eclipse auto-indents too. It may seem silly but some editors have shoddy auto-indenting. Anyway, I like Eclipse because it gives me some of the advantages of an IDE but it doesn't hold my hand.
  10. Have you tried an IDE? I used to think a simple text editor was all I needed too, but then I tried an IDE. The only time I use a regular text editor now is just for real quick edits, or stuff that I don't want to make into a project in my IDE.
  11. http://namecheap.com of course. I think I'll keep my domains at GoDaddy for now. I don't like the fact that they support SOPA, but I can't really afford double the cost of my domains per year either.
  12. I use Eclipse PDT. I just like the feel of it. Powerful if it needs to be, but simple and elegant if not. I also use Notepad++ for quick edits and such.
×
×
  • 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.