-
-
-
Problem regarding the speed of the website
Hi Use a tool like pagespeed to check where the problem is with the page loading times. https://developers.google.com/speed/pagespeed/
-
Live chat options?
There are plenty of free options out there based on PHP. Just Google PHP free chat. I have used LiveAdmin before when a client had a very limited budget, it was a while ago though. http://www.liveadmin.net
-
Need some information on naming web pages
I for one would not recommend this. You will end up with all your pages named index.html albeit in different directories. This seems like a formula for disaster when working on them because you may find you have multiple pages open, in your case with Dreamweaver, and mistakes may and probably will happen, thinking you are modding a particular page only to find it is not the page you thought it was.
-
- Question About CSS Resets
-
prepared statement errors with bind_result
Check out this Net Tuts article it may help you better understand the use of PDO statements. http://net.tutsplus.com/tutorials/php/why-you-should-be-using-phps-pdo-for-database-access/ bind_result is not a valid Data Object for PDO.
-
New member but old hand at the web design!
Hi Chris Always good to have an "old hand at the web design" contributing to the forums. Have fun.
-
Adding an anti-spam question to PHP form
Hi just check if the _POST value is equal to the answer. Something like this: if($_POST['field'] == 'Love'): // Process form else: // Error endif;
-
How to write down edge code in css ?
http://www.adobe.com/devnet/edge-code/articles/code-editing-with-edge-code.html
-
Parsing XML Response
As Gadgetgirl has said use simplexml, assuming you are running PHP of course. Then just loop through each element of the xml. Without more info about the data being returned a more specific answer is difficult to offer. More here.... http://php.net/manual/en/book.simplexml.php Your link just throws a 404 by the way.
-
- Full time and freelance - tax advice?
-
re direct html
Hi So what you have is a landing page with an image on it that links to your index page. Search engines are listing your index page because it actually contains some content and is considered to be more important than a page with just an image, that only links to the page containing the content anyway. Why do you need users to go to the landing page, does it contain some important information within the image? Is it really necessary?
-
Optimise PDO Statement
Hi all I have the following code which I use to insert/update data, from a $_POST array in this case, into a MySQL database. I have been using this for quite some time now on various projects but it is fairly time consuming to code each time the variables change. I figure it would be much better to be able to insert the values directly from the array rather than having to input the bind values over and over again, especially when the array contains a large amount of variables. I have tried all sorts to make this work and have now decided to start again from scratch with a little input from you guys. Hope you can help. <?php if (isset($_POST['Update'])): foreach($_POST as $key => $value): $key = clean_var($key); $value = clean_var($value); ${$key} = $value; endforeach; //ADD OR UPDATE DATA TO SETTINGS TABLE try { $r1 = ("INSERT INTO `settings`(`id`, `count2`, `count4`, `offset`, `max_books`) VALUES (:id, :count2, :count4, :offset, :max_books) ON DUPLICATE KEY UPDATE `id` = :id, `count2` = :count2, `count4` = :count4, `offset` = :offset, `max_books` = :max_books"); $q1 = $dbh->prepare($r1); $q1->bindvalue(":id", $id); $q1->bindvalue(":table_count2", $count2); $q1->bindvalue(":table_count4", $count4); $q1->bindvalue(":offset", $offset); $q1->bindvalue(":max_booking", $max_books); $q1->execute(); } catch (PDOException $e) { print "Error Inserting settings!: " . $e->getMessage() . "<br/>"; die(); } endif; ?> I got this far without success, am I on the right track? $array = $_POST; $insert_string = array_keys($array); $key_string = implode($insert_string,', '); $value_string = implode($insert_string,', :'); try { $r1= ("INSERT INTO `settings` (" . $key_string . ") VALUES (" . $value_string . ")"); $q1 = $dbh->prepare($r1); $q1->execute(array_values($_POST)); } catch (PDOException $e) {
-
Testing area for a live website.
I just password protect the directory using .htaccess and disallow in robots.txt.
-
Testing area for a live website.
I use a password protected area of my site as a "proofing bin" to show clients additions etc. 4li4s be aware that search engine bots will index these test sites unless you prevent access.
-
Strange line on Website in Chrome -- What is it?
Latest Chrome on Win7 no problems here ???