lastkarrde
Members-
Posts
165 -
Joined
-
Last visited
Never
Everything posted by lastkarrde
-
Definitely The biggest drawback for using these libraries (the size of the framework) is now basically gone. The majority of people who use them link to Google's CDN copy - http://code.google.com/apis/libraries/ - these are then cached on the users computer and don't need to be requested or re-downloaded if they have visited a page linking to it before.
-
Your not passing any ID to admin.php?edit&id= in your form code. How does admin.php know which userid to update?
-
Firebug and LiveHTTPHeaders, all you will ever need .
-
Have you added the curl entry to php.ini?
-
I personally would start using Symfony2 for new projects. The API is nearly frozen and plenty of community created bundles (UserBundle, FacebookBundle, AdminBundle) are starting to pop up.
-
Use call_user_func_array. Many popular frameworks (Symfony, Zend) do, performance impact is negligible compared to the gains you can get through caching, using an opcode cache etc..
-
I wrote a tutorial on using cURL with proxies. Just google for proxy lists, select the most recent proxies and then run them through a checker such as Charon.
-
What forum software are you using?
-
Install the Live HTTP Headers addon for firefox (https://addons.mozilla.org/en-us/firefox/addon/live-http-headers/). Navigate to the reply page, turn on Live HTTP headers, post a reply, then check Live HTTP Headers to see what is being sent.
-
Use substr
-
Oh right, I didn't see/think that button was a link. You misspelled extreme on http://www.getminecraft.com/get_started.html
-
Make the actual list/links alot bigger and more prominent. Mayby swap it with the current "What is minecraft.." so that it takes 2/3 of the page up.
-
Easy way to move 40 databases from one server to another?
lastkarrde replied to ghurty's topic in MySQL Help
Write a shell script, put the above commands in a loop and iterate over the names of your databases. -
Looks nice. Chuck it up on github (or somewhere) and I'll give you some feedback on the source.
-
MySql returns integers as strings - how to return as integers?
lastkarrde replied to fbwb's topic in MySQL Help
http://www.php.net/manual/en/language.types.integer.php#language.types.integer.casting Whammy! -
//if they are logging out etc.. $_SESSION['logout_message] = 'See ya'; //wherever you want to display the logout message if(isset($_SESSION['logout_message'])) { echo $_SESSION['logout_message']; }
-
How to make certain words an automnatic link?
lastkarrde replied to pioneerx01's topic in PHP Coding Help
Im assuming $content is the content (text you want auto links generated from) before it is output on the screen. However I guess your website isn't set up that way. Doesn't matter, because you can do it in Javascript anyway ^^ . Have a look at http://stackoverflow.com/questions/1774269/auto-link-specific-words-and-phrases and http://psoug.org/snippet/Javascript-Auto-Link-words_113.htm -
How to make certain words an automnatic link?
lastkarrde replied to pioneerx01's topic in PHP Coding Help
You could use str_replace on your content before it is output onto the browser. Sort of like: $output = str_replace(' Chicken ', ' <a href="/tag/Chicken">Chicken</a> ', $content); echo $output; -
How are you supposed to write a query if you don't know what the schema is?
-
Whats the table schema? Whats the expected output? What does it return?
-
To append something to the $_SESSION['poredi'] array you can do: $_SESSION['poredi'][] = 'some value';
-
What do you mean "not working"? What error is shown? What query is executed? (echo out $sql)
-
PHP-based indexing and search implementation
lastkarrde replied to kristo5747's topic in PHP Coding Help
At the very least you will want to put that data into a database (MySQL, MongoDB, Postgres), searching through the file is horribly inefficient. You could then attempt to use the database's built in full text search. Best bet for performance and accuracy is to use something 3rd party like Lucene. -
Do get the session to store an array of product_id's you would do: [code=php:0] if(isset($_GET['poredi']) && $_GET['poredi'] == "upo"){ $idp = intval($_POST['idp']); $sql = "SELECT * FROM product WHERE product_id={$idp}"; $query=mysql_query($sql); $ids = array(); if(mysql_num_rows($query)!=0){ $row=mysql_fetch_array($query); $ids[] = $row['product_id']; } $_SESSION['poredi'] = $ids; }
-
framework - dispacther duties (question)
lastkarrde replied to Destramic's topic in Application Design
It is in my framework, yes.