ignace
Moderators-
Posts
6,457 -
Joined
-
Last visited
-
Days Won
26
Everything posted by ignace
-
Are you getting any errors? Do you have display_errors = On and error_reporting = E_ALL in your php.ini?
-
date_diff
-
If you are in a money wasting mood then by all means donate PS phpfreaks.com provides an IRC-chat #help not sure how many lurkers it has but it should give you an edge in getting you the answer
-
No it doesn't have to. He explodes the value within the column so something like this will work: $checkboxes = array('value1', 'value2', 'value3', 'value4', ..); // values for your checkboxes $check = explode('-', $row['a_locations']); foreach ($checkboxes as $key => $checkbox) { echo '<input type="checkbox" id="', $checkbox . $key, '" name="a_locations[]" value="', $checkbox, '"', (in_array($checkbox, $check) ? ' checked="checked"' : ''), '>', '<label for="', $checkbox . $key, '">', $checkbox, '</label>'; }
-
Why you never will beat hackers: http://www.engadget.com/2010/03/09/1024-bit-rsa-encryption-cracked-by-carefully-starving-cpu-of-ele/ http://www.sektioneins.com/en/advisories/advisory-032009-piwik-cookie-unserialize-vulnerability/index.html http://www.sektioneins.com/en/advisories/index.html
-
$array = array('7', 'bar', 'orange', 'cherry', 'MISS'); print_r(array_rand($array, 3));
-
I was not referring to you Rather to the person from the hosting company. It's strange that they don't have an in-house professional that can deal with PHP problems as they are offering PHP hosting..
-
<input type="checkbox" name="records[]" value="<?php print $row['id']; ?>"> Repeated multiple times. The user selects a record by checking the checkbox and pressing update or edit or something these ID's are then passed through my script which will load all selected records from the database for editing/updating/..
-
PHP has a special constant that will hold the OS specific directory separator called DIRECTORY_SEPARATOR when you call dirname(__FILE__) you will already have the correct OS directory separator so no need to use str_replace() on it. However I add rtrim() to remove any trailing slashes both \\ as /
-
I am not aware of all your business rules/-requirements as I am not in charge of your project but you could solve this by: companies_has_products ------------------ company_id product_id
-
The sql_replace() is a function found in the SPIP extension which is apparently not present on GoDaddy
-
trying to create image using php coding for capcha
ignace replied to piyush23424's topic in PHP Coding Help
Just use recaptcha http://recaptcha.net/ It's easy & well-tested -
Your db design shows cracks: tbl_order (order_id/customer_id/quantity/price/postage/etc) * quantity of what? * price of what? Please post your entire ERD for review tbl_product_size (size) tbl_product_has_size (product_id/size_id/price/quantity) * quantity represents the number of times you have that size * I put price in tbl_product_has_size this means that it has to be removed from the tbl_product table or has every size of a certain product the same price? It seems you didn't think your ERD through which would lead to BIG problems later on in the development fase
-
if (mysql_num_rows($resultSql)) { foreach (mysql_fetch_array($resultSql) as $row){ $result[] = $row; } } Are you sure this is what you want: $result[] = 'username'; $result[] = 'e-mail'; $result[] = 'password'; Or are you after: $result[] = array('username', 'e-mail', 'password'); $result[] = array('username2', 'e-mail2', 'password2'); ..
-
SELECT * FROM location_bridge lb JOIN community c ON lb.community = c.id JOIN properties p ON c.id = p.community JOIN models m ON p.model = m.id JOIN location l ON lb.location = l.id WHERE l.id = $lid; If you can be a little more specific of what information you want to show we may be able to further optimize this query
-
There is no 100% guarantee method, known methods are: 1. Use a 1x1 pixel image <img src="http://www.yourserver.com/mail-received.php?email=.." width="1" height="1> Ofcourse if their e-mail client blocks images you'll never know who read it. 2. Use the Return-Path header. This will send an e-mail back to you in the event a mail could not be received. You can use PHP to read incoming mail (http://www.evolt.org/article/Incoming_Mail_and_PHP/18/27914/index.html) But this does not guarantee that your user will be notified if the mail was not received.
-
Can you give me an example XML because I don't understand what you mean besides I think your DTD is wrong and should be: <!ELEMENT root (option1|option2|option3)> <!ELEMENT option1 (#PCDATA)> <!ELEMENT option2 (#PCDATA)> <!ELEMENT option3 (#PCDATA)> The following is all valid <root> <option1></option1> </root> <root> <option2></option2> </root> <root> <option3></option3> </root> This code is invalid <root> <option1></option1> <option2></option2> <option3></option3> </root>
-
A and C are equal, B is possible but not really the optimized solution you are looking for.
-
Hey guys! IE is going to be removed. Windows 8 by default will have FireFox!
ignace replied to PugJr's topic in Miscellaneous
I know this is a joke but I wished it wasn't and truly hoped Microsoft would have a flash-of-genius I could even settle for Chrome -
$joined_t = implode(';' . PHP_EOL, $glue_t);
-
I tried to be consistent with his code