Everything posted by mealybar
-
mysql_num_rows() not working?
Try changing to $num_rows = mysql_num_rows(); The function should pick up the last query result object automatically.
-
Tried Firefox 4?
I'm loving the new Fox. I've had a couple of tab switching bugs, but nothing serious. My only gripe is they still haven't sorted it's RAM usage Saving tabs is now a preference, rather than a dialogue box on exit - check your options.
-
Tried Firefox 4?
I'm loving the new Fox. I've had a couple of tab switching bugs, but nothing serious. My only gripe is they still haven't sorted it's RAM usage Saving tabs is now a preference, rather than a dialogue box on exit - check your options.
-
PHP Security
The problem with using a framework is that so many of the security principles are abstracted away that it wouldn't be much of a learning exercise for the OP. The other thing with frameworks is blind faith that they've got all the security stuff sorted - which often isnt the case, or requires periodically checking for updates and bug patches. My advice would be to run through the links already posted and locally try out some of the techniques. But yes by all means use a framework on shipping code, with a fuller knowledge you've built up in your hacking you'll be able to verify the biggest vulnerabilities and make sure you're covered.
-
Help with PHP sessions
The second line is: header("Cache-control: private"); and fixes a bug in IE in certain situations on Windows XP.
-
ie tab extension for mac?
IE doesn't run on a mac, so there's no way for it to know and display how a page would render. You could look at running some virtualisation software and in it a copy of windows and IE. Personally I've got an old Windows laptop that I fire up whenever I need to do some testing with IE or windows versions of the other browsers that sometimes render pages differently to their mac counterparts!
-
Help with PHP sessions
session_start(); needs to be the very first line in the script - and to work in IE I think there's a second line but can't remember it off the top of my head. The spammers would be able to get round this 60 sec check by clearing their cookies or using another browser. But there again there'll always be a way round pretty much whatever you do if they're determined enough!
-
MySQL last_insert_id
I'm guessing you're running this through mysql_query()? If I remember rightly it will only execute one query per call, i.e. to your first ';'. I'd split them out, and use mysql_insert_id(). And better still if you're using innodb additionally wrap all the queries in a transaction to ensure either they all work successfully or none of them do.
-
How To Increase Visitors of Website ?
I'd suggest signing up to a forum is about providing knowledge, opinion, debate, and building a reputation amongst peers. Each click on the link in your signature then is worth 100000 more than "link building" spam crap forums and our blog comments get flooded with.
-
What Is The Best Code Editor In Your Opinion?
Notepad++ is a really create code editor but you get projects that are just too much for anything other than an IDE. I used to use Aptana, but they dropped PHP in v2 (has that changed recently?) so I moved onto Netbeans which I'm finding every bit as good. When on a mac I really like Coda, but Espresso is on a par. Spoilt for choice really
-
Memorizing codes
I wouldn't worry about memorising every tag, that's what the docs are for - and it's changing all the time anyway! The main thing is to know when and where to use a tag, attribute, method or function. Build your vocabulary, use a dictionary for the spelling
-
Forrst
I've literally just got an invite through. Checking it out now
-
Problem deleting from MySQL!
Sorry we cross posted last night and I missed your reply. Are you logging into the mysql with the same user/password combo as the script? If so I'd suggest popping a few echo's in there to see what's actually being executed.
-
Just revamped my personal site
Thanks guys @padioland Good point. I was trying all sorts with that image and initially was uncomfortable with all caps so dropped the .co.uk to lower and thought it balanced it a little better. Can see your point that including the .co.uk is completely superfluous - might have to have a little rethink
-
Trouble centering an image...
The only reason (most of) the other images seem centred is that they're the full width of the container. Easiest thing to do would be to make that one image the same width as the others.
-
Jquery customise multi-step form
Yeah, if I *only* had the option between <a href="#" and <div I'd go with div because a link with nowhere to go doesnt give any more semantic meaning does it Glad you got it working
-
What would you have charged for the work on this site?
I think it more depends on the services that you offered at the time. What kind of analysis of the old site did you do? Analysis of the competition? How thorough was their specification or did you have to piece things together through a series of meetings? There really are too many variables to put a price on the service you provided. A ballpark would be to try and remember how long it took you to design, code, implement, email, meet them, etc. etc. then multiply the number of hours by what you think your hourly rate was then or is now. If we're trying to put a figure on the finished article (and none of the extra bits that you may have done) it would be great to know what's there. From a quick look through it looks like several static pages, brought together with php headers/footers*, and a forum skin and install. Anything else? *you might want to check your markup if implementing another site like this, you've got several <html> <head> and <body> tags within the one page.
-
Jquery customise multi-step form
Synjyn is on the money with the <a href='#' causing the scroll to top. Try inserting a e.preventDefault(); at the end of the click event function. If that doesnt work try return false; in the same place (sometimes the prevent default doesnt work for me). Basically both those snippets stop the click event in it's tracks, which should stop it scrolling to the top. Check out http://api.jquery.com/event.preventDefault/ in the jQuery docs.
-
New Design for Review.....
Loose the centre aligned text and you've got my vote too
-
Problem deleting from MySQL!
The delete SQL command looks fine to me. An alternative to using delete would be to have a delete field on the table then mark a record as deleted with an update query. You'd then do the initial select something like this: SELECT * FROM table WHERE deleted = 0 That's the way I'd usually do it, but i find delete queries a bit scary
-
Problem deleting from MySQL!
Does the query work in a Database admin app/phpMyAdmin or whatever you use? Does the mysql user have permission to delete on that table? What's the error it's returning?
-
First attempt at web design (CSS & XHTML)
Hey, that's a great first effort, really quite like it If I was you I'd make the nav bar and the white content box the same width, just to fit with each other a little better. I'd also left justify the text in the white content box, and think about putting the bulleted list alongside it - to the right, which would reduce the line length, making it easier and faster to read. Ah one last thing, the margin at the top of the page seems to be a little too wide, perhaps half it. As I said, great first attempt at a web design though, well done.
-
Floating Divs with padding
No problem, floats are a pain in the... um... behind. Tip: dont open it in IE6
-
Just revamped my personal site
Yesterday I pushed the upload button on a redesign of my personal site. As I say in my blog post, it's more of the first design than a redesign because I'd just been using a template on Blogger for the last however long! Think I had more fun implementing the back end and admin, this design thing doesnt come easily to me being a developer - much more comfortable when I'm up to my eyes in code - but I could only go on so long resenting my blog/site thing. There's a couple of bits I'd probably alter, re-jig, or extras I'd like to add, but it'll do for now. Anyhow the url is: http://mealybar.co.uk/ Thanks Richard
-
Online Email Client
Yep, I haven't found anything better I mean if I setup the IMAP details into Mail or Thunderbird or something, I conceivably could get away with never having to use the Gmail interface.