Jump to content

Adam

Moderators
  • Posts

    5,717
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Adam

  1. What is this?? $qarray2 = $myAray['GetSMSInboundResponse']['SMSInbounds']['InboundSMS']; // $qarray2['ID'] contains the ID // $qarray2['Originator'] contains the originator
  2. Sorry, I forgot to attach the screenshot and haven't been on properly in a while. I would separate the header, side menu and footer from each other. Looks a bit weird all attached how it is. I would incorporate an image into the header, to make it a little less plain. Maybe a user a different font for headers/sub-headers to make them stand out. The bright yellow text clashes with the pale yellow background. I would float images to the left, like on the reviews page, so that text wraps around them cleanly. I'm not a designer myself, but I have had to do it in the past against my will.
  3. Err, you just posted it..
  4. Just be sure to display the additional fields by default, so that if a user without JS support comes along they can still complete it. Hide them as the page is loaded with JS.
  5. Generally web pages are served gzipped these days, so the size of the file isn't the amount of data the user is actually downloading. You should concentrate on reducing the size of your images, the amount of external requests you're making, code efficency, etc. If you're still worried about white space, there are plenty of minifying tools out there. Edit: Plus gzip will drastically reduce the size of simple ASCII text, is maintaining code like that worth a fraction of a kb? Certainly not.
  6. The problem is that you're trying to insert the topic ID into a primary key column, which only allows unique values. The solution is to add an additional column to the table - called "postID" if you want to keep the naming consistent - that will be the auto incremented primary key instead. That will act as a unique identifier for each row in the posts table. Remove the primary key index and the auto_increment from the topcID column, and continue inserting the topic ID as you're trying to do. Your INSERT statement doesn't need to change, as the postID column will automatically insert the next number in the sequence without you needing to insert anything into it. If the table is empty, rather than trying to alter it I would simply drop it and recreate it with the right structure.
  7. For sure. I just didn't want to complicate this situation any more..
  8. You have the 'topicsID' set as a primary key (a unique index), when there will multiple posts related to the same topic. Your table structure needs an extra column for the 'postID', which is the auto incremented primary key, and the 'topicID' should be a foreign key pointing to 'topicsID' column in the 'topics' table. Physically declaring the 'topicID' column as a foreign key isn't essential though, and not even possible if you're using the MyISAM engine. Edit: And don't listen again to the guy who told you to use an UPDATE in place of an INSERT.
  9. Might want to quickly edit your post to remove the password there..
  10. Why are you using UPDATE to INSERT a row? That doesn't make any logical sense. They're named what they are for a reason; INSERT is for inserting rows, and UPDATE is for updating existing rows. Can you post the structure of your database table? Sounds like you might need to add an 'auto_increment' to the ID column, to automatically increment the numeric ID on each new insert.
  11. Of course if you're turned down for a raise, you can always look for another job. Knowing you have a job to fall back on, you can then play the "pay me more or I'll leave" card. If you're valuable to the company they won't let you go over a few K a year.
  12. I wouldn't attempt OOP just yet if you only have a basic understanding of database interaction. Seems like you might be trying to tackle too much at once. With your game you need to take it one step at a time as well. First concentrate on the login system, given it's a good starter into sessions and security. Break that down into manageable steps, such as what data will you need to store, how you will validate the user, the type of security threats, etc. OWASP I have been told is a good resource to learn about security. To be honest at this point in learning (and probably for the next four years or more), any relatively large development you do, by the time it's finished you'll look back and have thought of a better way to doing it. Try from the start to split the bulk of your PHP from your HTML, only simple loops and conditions mixed in. That will make it a lot easier to upgrade later.
  13. Your pattern must be enclosed within delimiters. Replace it with: "/^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$/"
  14. There was no need to post the entire file, we just needed line 55: if(!preg_match("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)){ The problem is you're not including a delimiter before and after the pattern, therefore PHP is thinking that your delimiter is "^", but of course you're missing the closing delimiter. This is an easy problem to solve, just have a quick read about delimiters in the manual first.
  15. The layout's broken on the homepage in Chrome (at least) - see the attachment. Also you spelt "Afghanistan" wrong in the header, I think? The design is very basic. Not much grabs me about this, and to be honest it wouldn't sway me into visiting the restaurant. I appreciate you're new to web design, but if this is your business I would perhaps recommend using a free / low-cost web template as a starter, just to get it looking a bit more professional while you work on your own design. That said, the layout of content is good, with some aesthetic improvements it would be a lot better.
  16. Firstly it's not soccer, it's football. Only the Americans call it soccer, and only the Americans refer to that padded soft version of Rugby as football Going with first impression I have no idea what the site is really about. What does it offer that's related to sport, other than it being the theme? The landing page is pretty bare. The tab index on the sign-up form isn't quite working; I tried tabbing to the second input and it focussed on the logo? Also finding the English football teams within the sport select menus was quite confusing. Some leagues were listed as separate sports, some you had to go to 'Soccer' first. After signing up the theme (is it a theme or something you designed?) is clean and straight-forward, but doesn't look anything like the landing page. Looking at the videos page, I would expect to see the videos of the sport I chose at sign-up (soccer football) to be kind of the default sport - for every page in-fact. Seems a bit pointless to have selected it at the moment. Beyond that it's just SocialEngine really. What were modifications you made?
  17. Response.write() - is this wrapped in ASP or something? Can you show the full code of trackingcode.php?
  18. You don't want to click the submit button, but submit the form. Simply call the submit() method on the form object: document.forms["form"].submit();
  19. Yeah, nice find. Posted it to about 100 people at work.
  20. I don't really understand why you need to do this? Nevertheless you can simply detect the form submission and inject the value of the select before allowing it to continue: <form action="/admin/home.php" method="GET" name="search"> document.search.onsubmit = function() { this.action = this.action.substr(0, this.action.indexOf('#') + 1); this.action += '#' + this.tbl.value; } The added name attribute in the form tag is important.
  21. If you look behind the scenes, goo.gl is actually using a disguised text input to be able to select the text. Selecting text within an input isn't exactly simple, thanks mainly to all the cross-browser issues, but I should imagine you'll be able to find a jQuery plug-in to make it simple. "jCaret" seem to be the most popular, but I've never used it myself.
  22. Sorry, I don't understand what the problem is?
  23. Use the 'i' modifier after the closing delimiter: [...]{2}|GIR 0AA)$/i,
  24. Exactly like that. Have you tried it?
  25. Just pass $thread[0] and $thread[1]: $joinPoint = new Threadi_JoinPoint($thread[0], $thread[1]);
×
×
  • 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.