ignace
Moderators-
Posts
6,457 -
Joined
-
Last visited
-
Days Won
26
Everything posted by ignace
-
I think you mean a new row in the orders table? No point in creating a new table for each customer. Look through these forums, these questions have been asked plenty. Example: http://www.phpfreaks.com/forums/index.php?topic=359091.msg1697657#msg1697657 http://www.phpfreaks.com/forums/index.php?topic=359225.msg1698394#msg1698394
-
This about sums up the casual weekday of a web developer
ignace replied to johnny86's topic in Miscellaneous
Sums it up nicely! -
see here create a foreign key in phpmyadmin
-
Restricting database records based on allowed "cities" or "counties" fields
ignace replied to vestport's topic in MySQL Help
Are you sure you really need to match a user for each given city? What are your criteria to allow user A to search for cities B, C, and D and user E for cities C, D, and F? Is it possible you could also just group them, so that user's of group A can search in cities B, C, and D and that users in group E can search in cities C, D, and F? PS: Using a tool like PHPMaker to generate the skeleton of your project is great, like UML tools assist in generating Java code. But not for programming an enitre app.. If this is for some client then possibly at some point you will have to hand-edit the code and PHPMaker will complain (or worse overwrite) your changes. PHP/programming is not so hard, MANY have gone before you! -
If you use a library like jQuery you don't even have to worry about the whole AJAX part. Running AJAX with jQuery is as simple as (term is what the user typed): $.get('data.js?term=' + term, callback); As demonstrated below: // Example Code, Not Suitable For Production function runLiveSearch(conf) { conf = conf || {}; var term = conf.term || '', minLength = conf.minLength || 3, callback = conf.callback || {}; if (term.length >= minLength) { $.get('data.js?term=' + term, callback); } } $('#live-search').keypress(function() { runLiveSearch({term: $(this).val(), callback: function(data) { // process }}); });
-
WE CAN NOT HELP YOU IF YOU KEEP WITHOLDING INFORMATION. I ALSO TOOK UP CAPS FOR WRITING SINCE YOU ARE SO USED TO IT, I HOPE YOU DON'T MIND. IMO ARE YOU DOING THIS: $ACCOUNT->GET_SPECIFEC_ATT('$BRANCH_NAME', ''); IT SHOULD BE $ACCOUNT->GET_SPECIFEC_ATT('BRANCH_NAME', '');
-
Since you have an API, developers already adhere to something. Why would jQuery.load be insecure? We are going to need more info. If they can't compromise you through your API, I would allow the developers as much freedom as possible. Allowing creativity is key to attracting parties.
-
Zend framework 2, just to put your teeth in their awesome Db component. https://github.com/zendframework/zf2
-
You should write it in JavaScript, and preferably use a <canvas/> While on the matter, you should also read "JavaScript Patterns" this contains all the JS optimizations you will need to consider while building your game. Look at Command & Conquer Tiberium Alliances for a browser-based game with moving units. You will also need a book/resource with explanations of how you can create a fair multiplayer when dealing with clients. The server is the referee, and clients should only be able to communicate their actions, not their result. Examples of communicating their results: Examples of communicating their actions: This puts the server in control of what damage is done instead of the clients. The server should also validate each request, as you should with any normal application you build. You can further expand on this by creating admin specific requests: Obviously in admin-kill.php you should check whether the client is in fact an admin. Also any security measures you take with a normal application should also be present here, like for example preventing the obvious CSRF attacks.
-
Hello and welcome. Hope to see you around.
-
Have an hidden input field named section in each form: <input type="hidden" name="section" value="a"> Then when processing check which section: if ($_POST['section'] === 'a') { // section a processing } For the d part, let that be the else: } else if ($_POST['section'] === 'c') { // section c processing } else { // section d processing }
-
This outputs: This is because when $test1 is passed to the function, it is not linked to $x. It's value is simply copied to $x and $x is part of the function scope where-as $test1 is part of the global scope. Using a reference you can bind $x in the function scope to $test1 by changing the declaration of $x to &$x. When you then run the above code you will get: I did not alter the code and then run it to tell you this. Most people on these forums can tell you this without executing the code because they understand how PHP/functions works, and you should too.
-
That's backwards. The ring chooses someone worthy and you are automatically a part of the Green Lantern Corps. Speaking of rings.. that darn hobbit still has mine!
-
I don't know what is scaries: that people write their code like that or that PHP happily parses and executes it...
-
Creating a DB for restaurant online ordering website
ignace replied to eldan88's topic in MySQL Help
It was sarcasm! But you make a good point, and sure, getting a second opinion IS a good thing IF that person is qualified, not so sure about the kind of confidence you should put in an anonymous internet user. You also make my point: -
Creating a DB for restaurant online ordering website
ignace replied to eldan88's topic in MySQL Help
Can you elaborate why you think this is a bad idea? Because having a separate DB for each restaurant makes it easy to scale it in the future (for example all low-volume DB's on one node) where-as one DB means you need to replicate ALL the data over multiple nodes regardless of high- or low-volume websites. -
Of course, I didn't intend to write the entire script for you so you could just copy-and-paste it and learn nothing in the process. For example in your current code you use $getUserRank why? After the first while() $getUserRank will contain the lowest possible rank (12640), since the value is constantly overwritten. So at the second loop $getUserRank will be 12640 not 1,2,3,4,.. Just do the same thing as you did with $rank for $getUserRank and move it to your second while and be sure to enclose the $rank++ between parenteses and you'll find that it will now correctly display the rank (and remove the first while() loop altogether, you don't need it!).
-
Creating a DB for restaurant online ordering website
ignace replied to eldan88's topic in MySQL Help
Apparently you have every confidence in the developer you hired! -
It's better to write public.
-
Now you are just pissing me off! I wrote you some example code and asked you to try it out which would have let to you examining the code as to why mine works and yours dont. But instead you ignored my effort and went ahead with no clue of what you are doing or what is wrong. Everyone on this forum who glances over your code can tell you why everyone has the same rank, but I'm now just refusing to tell you because you showed no respect whatsoever!
-
Try this: echo $blog_posts[0]->error[0]->code;
-
bcrypt probably. I've never used it though. So far I have never had a case that had such a high security concern. And if the project does have to handle sensitive data, we employ licensed third-party software. Because it's better to be able to point the finger at someone other than you
-
PHPass is a good idea as a minimum security measure. Unless you are storing more sensitive information like credit card info and such, which I doubt.