-
Replied To a Post in Adjust size of the vertical page for printing
You can use a CSS to format the layout as you want, also read this article: * http://alistapart.com/article/goingtoprint/ it is a bit old but still useful. -
Stopped Watching Creating Interactive Web Interfaces with the help of Knockout.js
As I spend time in the Daniweb forums, I see some questions that ultimately come down to the issue of manipulating JavaScript data and a user interface on a website. … -
Began Watching Creating Interactive Web Interfaces with the help of Knockout.js
As I spend time in the Daniweb forums, I see some questions that ultimately come down to the issue of manipulating JavaScript data and a user interface on a website. … -
Began Watching Are background processes possible?
Hello, is it possible to create a website that can **receive a command/word from the user**, and then **search other websites **for a file associated with that word? The file … -
Replied To a Post in Complicated MySQL statement?
Hi, posting the structures of the tables would help to understand. Right now it seems you just need to select by `av.sku_id`: select av.value, av.id, av.sku_id from product_attr_vals where av.sku_id … -
Began Watching Image Slider with Thumbnails
I'm using [this](http://www.menucool.com/slider/javascript-image-slider-demo2) Image Slider with Thumbnails.(http://www.menucool.com/slider/javascript-image-slider-demo2) I tried to make it fullscreen with floating Thumbnails but it is not working properly. Can anyone help me to make it responsive … -
Replied To a Post in Convert date to integer
Hi, It's normal because 0 equals to 01-01-1970 so, to get previous dates, you will receive negatives values. The problem is that, if you want to store it in MySQL, … -
Replied To a Post in Search within an Array and add more content
Always inside the loopCount statement `if($loopCount == 1)` add this: if(preg_match("/[A-Z]{2}(?=[\s]{1,}[0-9]{5})/", $myValue, $match) == 1) { $array_two[$arrayIndex]['state'] = $match[0]; } else { $array_two[$arrayIndex]['state'] = ''; } The pattern will search … -
Replied To a Post in Search within an Array and add more content
Yes, it can be done. Inside the loop that generates this array place this code: if($loopCount == 1) { if(preg_match("/[0-9]{5}/", $myValue, $match) == 1) { $array_two[$arrayIndex]['zip'] = $match[0]; } else … -
Replied To a Post in How to use DIV as a TABLE
Hi, if it does not work give us some more information: How it does not work? What result do you expect? What kind of problem you get? And possibly show … -
Replied To a Post in Removing .php from URL (with nginx)
I cannot test right now, but try: return 301 ^(.*)$ $1.php Note that `try_files` is important because it will check if the script exists and will avoid some security issues, … -
Began Watching Removing .php from URL (with nginx)
Hi, I'm not sure if I'm posting this in the correct place as this is related to nginx configuration and not specifically PHP scripts. If I am posting this in … -
Replied To a Post in How to use DIV as a TABLE
Something like this should work: <!DOCTYPE html> <html> <head> <title>Tabless</title> <style type="text/css"> *{margin:0;padding:0;} .table { display:table; margin:50px auto; width:960px; position:relative; } .tr { display:table-row; margin:10px 0; } .td { display:table-cell; … -
Replied To a Post in uneditable text
Add the `readonly` attribute: <input type="text" size="50px" name="page" value="<?php echo $page; ?>" readonly /> But remember that a client can always change the input, so if you do NOT expect … -
Replied To a Post in AGE calculation giving difference in Days
Hi, have you considered the DateTime library? <?php #$dob = $_GET['dob']; $dob = '29-06-2009'; $at_day = '31-03-'.date('Y'); $dt_dob = new DateTime($dob); $dt_now = new DateTime($at_day); echo "<pre>"; print_r($dt_now->diff($dt_dob)); echo "</pre>"; … -
Replied To a Post in Ho to add 1 hour to my date
Without the quotes and replace the dot with a comma, `dateadd()` takes three arguments the format, the integer to add and the date, currently it is like you are passing … -
Replied To a Post in Ho to add 1 hour to my date
Hi, use `dateadd()`: dateadd(hour, 1, candidat_rendezvous_date) * http://technet.microsoft.com/en-us/library/ms186819.aspx -
Replied To a Post in My database setup does not work in any sqlserver
Hi, this is probably caused by the `mysqli_fetch_array()` at line **16**, it will move the internal pointer to the following row, so the loop will display only the last four … -
Replied To a Post in Inserting a multidimensional array into db
The loops seem to be fine, the error means that `$array_two` is served as a string not as an array. Check if there is an intermediate step that resets the … -
Replied To a Post in Convert CSS/SASS from online to local
I'm not sure I've understood your request. But if you open the above stylesheet you will see: @font-face { font-family: 'Patua One'; font-style: normal; font-weight: 400; src: local('Patua One'), local('PatuaOne-Regular'), … -
Replied To a Post in Message box
Set the **name** attribute to the input field, otherwise the POST array will not receive it and the if statement will fail. This: <input type="submit" value="Login"> Must be: <input type="submit" … -
Replied To a Post in PHP Class COM not found.
Remove the semicolon preceding **extension** otherwise the line is considered a comment and remove also the double quotes, so: extension=php_com_dotnet.dll -
Replied To a Post in Send 2 Different Emails to 2 Different Recipients
Hi, try to remove the white spaces between the addresses in the destination variables `$to` and `$to2`, so these: $to = "email@gmail.com, ".$reg_email; $to2 = "email@gmail.com, admin@xxxxxxx.com"; Should be: $to … -
Replied To a Post in Search based on multiple textform and table
Hi, show the query generated by your script, i.e.: print_r($qry); Then try to run the same query through a mysql client, from shell or by PHPMyAdmin. And add: $res = … -
Began Watching Some MySQL variables with huge values??
Recently I've need to do some table repair and got into my variables and noticed some bizzare numbers. For those of you that know MySQL, these may be familiar to … -
Began Watching CMS Themes
Hello, I wonder if it is possible to create a website with your own CMS and with a changable themes feature. I prefer using my own CMS since I have … -
Replied To a Post in Format date for mysql insert
Change it to: SET @date_start = DATE_FORMAT(STR_TO_DATE(@from_date,'%d/%m/%Y'), '%Y-%m-%d'); Full example: > SET @from_date = '29/11/2010'; SET @date_start = DATE_FORMAT(STR_TO_DATE(@from_date, '%d/%m/%Y'), '%Y-%m-%d'); show warnings; select @date_start; Query OK, 0 rows affected … -
Began Watching MERGE intranet server's database (MSSQL) w/ web server's database (MySQLL)
I have a project that must have centralization of databases that will have access to the web on a PHP script. I can merge MSSQL and MySQL databases if and … -
Began Watching Request Processing in PHP
How does request processing works out from the perspective of a php developer? More than that I'm concerned with e.g. once request is parsed through.htaccess ,mapped to the file and … -
Replied To a Post in Include Isn't Global
The problem is the scope of the function not the `include()`, a function will not consider an external variable unless this is global and you define it inside the function, … -
Replied To a Post in String Width in PHP
**@toxicandy** With `imagettfbbox()` you can precalculate the width of the string and add the space that you want to both sides, for example if you want 50px per side you … -
Replied To a Post in String Width in PHP
Try with [`imagettfbbox()`](http://php.net/manual/en/function.imagettfbbox.php) as suggested in this comment: * http://php.net/imagettftext#83248 Also, consider to use `mb_strtolower()` and `mb_convert_case()` instead of `strtolower()` and `ucwords()` because the latters will not work correctly with … -
Replied To a Post in CodeIgniter and ajax
Hi, It should not depend on CodeIgniter, this can relate to the system in which PHP is executed: in the case is not synchronized. Have you tried to display the … -
Began Watching Safety
Hello, I wonder, is it safe to use and run a standard computer (let's say Pentium 4 CPU 2 GB RAM) for 24 hours a day and 7 days a … -
Replied To a Post in Mailchimp API signup not working
Probably somewhere, one of the echos or of the variables is missing a `;`, for example: if(1 == 1) { echo 'true' } The missing `;` will generate the same … -
Replied To a Post in Mailchimp API signup not working
You're starting the class in `$chimp`, not in `$MailChimp`, so change this: $chimp = $MailChimp->call('lists/subscribe' To: $result = $chimp->call('lists/subscribe' -
Replied To a Post in PHP XML not showing anything
You can use `attributes()`, for example: <?php $file = simplexml_load_file("http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml"); foreach($file as $key => $value) { echo "Time: ". $value->Cube->attributes()->time . "<br /><br />"; foreach($value->Cube->Cube as $key_1 => $value_1) { … -
Replied To a Post in Codeigniter error
That's probably happens because you're trying to access the controller from the application directory instead of using the `index.php` file. If, for example you have a controller named Articles, then … -
Replied To a Post in Helvetica Neue
There are many. Among the Google Fonts, I think good compromises are Roboto and Lato: * http://www.google.com/fonts/specimen/Roboto * http://www.google.com/fonts/specimen/Lato -
Replied To a Post in how do i get the nearest neighbour states based on IP address
Mine is more an idea than a solution: you will probably need the position (in coordinates) inside the state, in order to evaluate the nearest border. For example, in MySQL, … -
Began Watching Improve MySQL Query Performance
I have the following query which joins 5 related tables to get the desired result set of 10 rows, I did my best to solve the issue by adding indexes … -
Gave Reputation to diafol in Using mysqli prepared statements on schema queries
Drat - sorry cereal, we must have posted at the same time and as mine was after yours, I didn't get the 'new post flag' on the listings. I shall … -
Replied To a Post in Helvetica Neue
Yep, you have to buy the license to use it as webfont and then you apply it to the website through the `@font-face` attribute. In order to work you need … -
Replied To a Post in Helvetica Neue
> Or is it destined to default down to Arial a majority of the time (provided the user doesn't have Helvetica Neue or Helvetica installed on their machines)? Correct. But … -
Replied To a Post in How to define prefix of array variable?
Use a **foreach** loop to get the keys and the values: foreach($array as $key => $value) { echo "$key has variable $value"; } You can also use `array_keys()` and `array_values()`, … -
Replied To a Post in Using mysqli prepared statements on schema queries
Maybe I got it, add `$stmt->store_result();` before num_rows. Looking better at my previous test I was getting your same output, now is: mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => … -
Replied To a Post in Using mysqli prepared statements on schema queries
Hi! It seems to work fine form me, but this: $stmt->$mysqli->bind_param("s", $dbname); $stmt->$mysqli->execute(); should be: $stmt->bind_param("s", $dbname); $stmt->execute(); My example: $stmt = $mysqli->prepare("SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = ?"); … -
Stopped Watching do word wrap function include '\' in string while wraping?
Hello, I have a string $string="- [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall] - [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall] For both cases,look for a value named “InstallLocation” containing the string “\Hewlett-Packard\\”, either delete or clear this value and"; and i … -
Began Watching do word wrap function include '\' in string while wraping?
Hello, I have a string $string="- [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall] - [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall] For both cases,look for a value named “InstallLocation” containing the string “\Hewlett-Packard\\”, either delete or clear this value and"; and i … -
Stopped Watching do word wrap function include '\' in string while wraping?
Hello, I have a string $string="- [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall] - [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall] For both cases,look for a value named “InstallLocation” containing the string “\Hewlett-Packard\\”, either delete or clear this value and"; and i …
The End.