Jump to content
Larry Ullman's Book Forums

margaux

Members
  • Posts

    453
  • Joined

  • Last visited

  • Days Won

    52

Everything posted by margaux

  1. Thanks for making that change.
  2. Thanks Antonio for your comments. I thought fontdeck took care of the different font file extensions. The computer I'm using to test on IE is not mine so its difficult to use as I dont know how it is set up. But when I look at this site on IE8 initially it looks okay, then as I navigate to different pages, the top nav loses the font and horizontal layout but if I refresh it renders correctly so I"m not sure if its working or not.
  3. Thanks HartleySan, I will give it a go when I finish my current project. I tried to use good practices such as (some) rwd, html5 which didnt work overly well and templates (thanks Larry, I used alot of the techniques from your ecommerce book). The client is pleased with the overall look but they haven't looked at it in IE and it falls down, badly in IE7. So if anyone wants to suggest improvements to the site for IE, I'm all ears - particularly the top and bottom navigation and why the top navigation is not picking up the font-family and highlighting the nav item for the current page. Works okay in modern browsers.
  4. I don't know if you can access three records at once but in your while loop you could display one record, keep a count of the number of records, if total count is divisible by 3 end the row and start a new one.
  5. I agree with rob's comment. Also it would be good if the author and date of the most recent comment for each thread were displayed as per the previous version.
  6. Appsterdam is a community not an event. It's been started by an ex Silicon Valley developer who wanted to create a developer community with a different vibe to Silicon Valley. Could be an option when you finish school and its not tooo far from Scandinavia. New Projects - I've been asked to quote for a site that provides functionality similar to http://en.parkopedia.co.uk/ Before I reply that I'm the wrong person I wonder if anyone knows how to go about learning about location based services.
  7. The perks sound nice, but I have also heard the same thing about long hours and not much life outside the company. There have been some interesting articles from former employees based in Silicon Valley - basically the perks are provided to keep you inside the company for longer hours. Antonio - have you ever considered Appsterdam?
  8. Thanks Rob, could you be more specific? What should I check? What settings and how should they be set?
  9. I've set up a contact form on a wordpress site. On my test site (which is not localhost), it works fine. But on the client's site its not sending the emails. I did a print_r of the $mail object which amongst other things shows [ErrorInfo] => Could not instantiate mail function Does anyone know what I need to do to get it working on his site? Thanks
  10. You don't really need to post the entire error message, especially when the first line tells you what the problem is: your script, mysql.inc.php cant be located. The BASE_URI constant needs to reflect where the files are stored.
  11. I like using the enum type, which is very simple and best used when you are certain additional values will not be required. Would you say this field type is a good performer?
  12. I started this edition on Safari Online Books a couple of weeks ago and so far its going well (though I have little time at the moment to give it a proper read). Having bought the previous edition less than 6 months ago, I'm reluctant to purchase it, but I may as I find Larry's books good sources for reference as well as learning. I'm looking forward to your comments.
  13. Sorry rob - my bad. Posting code on the run is not a good idea! And you are right, the curly bracket was in the wrong place. Thanks alot for the help. This project is pushing the boundaries of my experience with oop so I may be back with more questions. Final code that works is $emails = $wpdb->get_results( "SELECT email FROM emails WHERE zip_prefix = '$zip_prefix'" ); foreach ($emails as $obj) { $email_array2[] = $obj->email; } return $email_array2;
  14. I'm finshing off a website for someone whose original developer has gone awol. Its a wordpress site and the functionality in question uses the wpdb class to access a custom table and do different things depending on what's returned by the query. $emails = $wpdb->get_results( "SELECT email FROM emails WHERE zip_prefix = '$zip_prefix'" ); foreach ($rows as $obj) { $email_array2[] = $obj->email; print_r($emails); print_r($email_array2); return $email_array2; The above code is inside a function which passes the email array to phpmailer.php. I need to format the data so phpmailer.php can use it. Everything seems to be working other than this step. The 2 print_r statements are so I can see what is going on and will be deleted when all is working. There is definitely more than 1 object in the array returned by the wpdb class. The output from print_r($emails) is Array ( [0] => stdClass Object ( [email] => example2@email.com ) [1] => stdClass Object ( [email] => example3@email.com ) [2] => stdClass Object ( [email] => example@email.com ) ) and the output from print_r(email_array2) is Array ( [0] => example2@email.com ) I thought I had to use the wpdb class to query the table. If there is another way, please let me know. Thanks for all the suggestions.
  15. Thanks rob! One thing though - I'm only getting the first object put into the array. Any ideas?
  16. How do you convert an array of objects to a simple array? For example, I have $emails = Array ( [0] => stdClass Object ( [email] => example@email.com) [1] => stdClass Object ( [email] => example2@email.com ) [2] => stdClass Object ( [email] => example3@email.com ) ) and I'd like it be Array ( [0] => example@email.com [1] => example2@email.com [2]=> example3@email.com ) I've tried using a loop to cast the object to an array but that didnt seem to work. Thanks for any suggestions.
  17. No problem. Great that you figured it out - though sometimes frustrating, you often learn alot from debugging your scripts.
  18. We need to see the code from the mysql_connect.php script which defines $dbc. Check for any typos as the smallest thing can cause an error e.g. you have named one file mysqlconnect.php and another into_register.php. Its important to be consistent with your naming conventions.
  19. Your query is trying to insert 6 values but the mysql_stmt_bind_param is only 'binding' 5 parameters to the statement. You need to change it to $q = 'INSERT INTO messages (forum_id, parent_id, user_id, subject, body, date_entered) VALUES (?, ?, ?, ?, ?, ?)'; // Prepare the statement: $stmt = mysqli_prepare($dbc, $q); // Bind the variables: mysqli_stmt_bind_param($stmt, 'iiisss', $forum_id, $parent_id, $user_id, $subject, $body, NOW());
  20. Thanks for replying. I'm really struggling - resouces are scarce. At this point I just want to integrate my functionality (which is basic) into a wordpress site. After that I'll modularise it properly, make it flexible and look to make it a widget.
  21. As you're using a mix of javascript and php its difficult to help without knowing how your logic is structured. What's the action attribute on your form set to? success.php? If so in success.php, you could do something like $fn=$_POST['first_name]; echo '<p>Thank you ' . $fn. '. Your email was sent to us.</p>'; this is the bare bones of what you need to do and is not secure. I imagine many programmers will rail on this code for how insecure it is. Show how your logic is structured and we'll be able to tighten up the code. Really you will want to do some server side validation as well. And a side note... placeholder is an HTML5 attribute and will not be recognised in older browsers. Not a huge issue as long as you've provided a label for the fields so visitors using older browsers are catered for.
  22. I'm (attempting) to build a wordpress plugin, for several reasons, but I'm sure it will be a learning experience. Are there many members here who have done this and would be able to answer some of my questions? I have loads! For starters - any recommendations on resources. I've looked at Wordpress Anthology which is good but doesn't go deep enough and Professional Wordpress Plugin Development which is also good but hard to follow. Thanks for any and all comments.
  23. Everyone learns differently and I am not really a fan of sitepoint's books but I did take a couple of their online tutorials a year ago which I thought were excellent - javascript live and their php one. I found that once I was confident with php, I could pick up any Wordpress book and work my way through it. My recommendation therefore would be to work your way through Larry's PHP and MySQL for Dynamic Websites book. Then have a look at something like the sitepoint book or Smashing Wordpress.
×
×
  • Create New...