Posts by Papa Charlie • 8,721 points
217 posts
-
0
votes2
answers111
viewsA: Activation e-mail
TBL-USERS name | email | ... | status | code-validate When the user is inserted into the DB, a hash will be created that you can write to code-validate and the status keeps it off. The email goes…
codeigniteranswered Papa Charlie 8,721 -
2
votes1
answer131
viewsA: Array is not as array
Set the charset on the connection with utf8. PHP says: This function only works with UTF-8 encoding data $db->query("SET NAMES 'utf8'");…
-
0
votes2
answers564
viewsA: How to remove the "Wordpress" word from the <title> panel?
I do not use Wordpress, but I have here. I do not know if it does in the translation package, but I found in the archive wp-admin/admin-header. Lines 31 - 34 if ( $admin_title == $title )…
wordpressanswered Papa Charlie 8,721 -
11
votes5
answers83787
viewsA: Passing variables through the URL using friendly URL via GET
.HTACCESS RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f [OR] RewriteCond %{REQUEST_FILENAME} \.php$ RewriteRule (.*) index.php [QSA,L] ROUTE // www.site.com/carros/novos -> carros/novos…
-
1
votes2
answers51
viewsA: Filter Useagent Via Database
If I were to log statistics, I would use a temporary TBL to store raw information - ID, Useagent, Address, Referrer... each in a field Basiclog: ID | UseAgent | Referrer It’s pretty raw data and you…
-
0
votes2
answers426
viewsA: PHP: elements with and without explicit keys in the same array
Since you will create a function for this, you can pass as string and find the elements markers... Just explode in , and if there is : the function will understand that is an array.…
-
6
votes1
answer6313
viewsA: Regastar Mysql column name and values
Well, I may be wrong about your doubt, but from what I understand, you want to make a query and return all fields of the table and do the listing without setting the field on $row use $row[$field]…
-
1
votes1
answer277
viewsA: Codeigniter - Installation script
Error informs that Driver did not find DB. You need to change the DB in your file application\config\database. Change the lines below: $db['default']['username'] = ''; $db['default']['password'] =…
-
5
votes1
answer888
viewsQ: PHP (setcookie) vs header (header )
I see some frameworks, CMS and the like, writing cookies directly in PHP with setcookie and others stock to send us headers at the end of the run. I wanted to know how to create a pattern for the…
-
0
votes2
answers112
viewsA: Strange code (Green) coming back from the database
Color doesn’t matter, it’s just Highlight for tagging as PHP does. I recommend you change <?=$teste?> for <?php echo $teste; ?> You can see in the link…
-
1
votes2
answers198
viewsQ: date validation
I am creating a validation class and I have a method to validate dates. When will I validate based on now, strtotime calculates including time. $v->rule( '07/28/2014' , 'before.2014' ) this rule…
-
2
votes2
answers800
viewsQ: Check if a sequence of numbers corresponds to a valid timestamp
I need to check if a sequence matches a valid timestamp. Use is_numeric, ctype_digit, will only validate if it is numerical... I want to know if the timestamp matches a date.…
-
1
votes2
answers2134
viewsA: Capture data after character # in browser URL
You will never be able to use PHP to capture the hash because they are not passed through the browser. Hashs are not passed to the server, they are interpreted by the browser only as 'location' on…
-
1
votes2
answers893
viewsQ: Calculate the difference between timezone dates
I need to calculate the difference between 2 dates with different time zone: The calculation is between the date of posting and the current date. Assuming a post is from America/Sao_Paulo and…
-
2
votes3
answers1532
viewsA: Session is not being destroyed with session_destroy()?
When you click exit, a new page is loaded by logging out the user. If it clicks back, the session will NOT be redone, it is just the browser cache. If it returned to a page with options to edit the…
-
11
votes1
answer230
viewsA: PHP says that two equal strings have different lengths
If you want to compare strings that have acentos or special char, the best way is Mb_* mb_strlen to count the number of characters The issue is unrelated to UTF encoding, in the same way that native…
-
2
votes1
answer3336
viewsA: Pass ID by parameter in modal window
a simple example $.ajax({ url: "cliente.php?id=123", }).done(function( content ) { // LOAD MODAL( content )!!! }); php client. use $_GET["id"] to query user data and return information…