Jump to content
Larry Ullman's Book Forums

Jonathon

Members
  • Posts

    1064
  • Joined

  • Last visited

  • Days Won

    55

Everything posted by Jonathon

  1. Basically you haven't got the mail server set up for XAMPP You can set it up here using this link http://roshanbh.com.np/2007/12/sending-e-mail-from-localhost-in-php-in-windows-environment.html But if you just comment out the mail() line and check the script works.
  2. Well you can just check your own DB to see what columns are in your table. If it's not in there either add it to the table or just remove 'active' from the mysqli_query
  3. Ok, inside register try this <?php # Script 16.6 - register.php // This is the registration page for the site. require_once ('config.inc.php'); $page_title = 'Register'; include ('header.html'); if (isset($_POST['submitted'])) { // Handle the form. require_once ('mysql_connect.php'); if ($dbc) { echo 'Connected'; } else { echo 'Not Connected'; } Does it say you're connected or not connected
  4. I didn't check all the code, but if you change $dbc = mysql_connect ($dbhost, $dbuser, $dbpass, $dbname) $dbc = mysqli_connect ($dbhost, $dbuser, $dbpass, $dbname) You should stop that error.
  5. You're using mysql to connect to the database but then trying to use mysqli_real_escpae_string()
  6. Hi Larry, I have a personal project I've been meaning to do for a while, it will be quite big and I imagine fairly complex as there's a lot of things I want it to be able to do. I also have been meaning to get more into Yii, so i thought why not build this personal project in Yii! Especially as frameworks can help you accomplish fairly time consuming tasks quickly and a lot of security / validation concerns are often put to rest within the framework itself. I started building together the HTML and CSS I was going to use for this project, I'm about 75% through the home page before I decided to combine this with Yii, but I wondered if you had any guidance or tips really in how to get Yii to behave visually the way you want it to? Can you make it generate HTML Ids or classes or does it always have a series of its own tags? Obviously most websites have 3+ different style layouts, the index is usually different from the bulk of content, which is different from search results which is different from a contact page etc. For instance my index page I wanted a fairly big search ability, with lots of options but on a more standard page this big search ability wouldn't need to be there at all, as the site always runs through index.php I wasn't sure how Yii would know to show this search capability on index and not on a standard page for one and that's before I even go about styling it. Hope this makes sense?
  7. Add_to_cart() you need the parenthesis and the error about providing the correct number of arguments means you need to see what arguments the procedure takes and call it with the correct number and type of arguments.
  8. CALL Select_Sale_Items( 1 ) Click the SQL tab inside your database in PHPMyAdmin
  9. Run the query in PHPmyAdmin and see what the error says.
  10. You're better off Googling for this error, I looked briefly earlier there are many similar threads and questions. I wouldn't just re-install just yet.
  11. I look forward to it. That makes sense CSS wise, but will be nice to see how to tie it in (properly) with js. I'm sure there is plenty of legacy code or bad code on the web. As I've said to you before I find that the main crux with .js today is dodgy .js code.
  12. Nope these would be the thing I was interested in. I'd like to know how they really work. Thanks Larry :-)
  13. Hi Larry, I just wondered if you cover modal boxes in your new book? I know these are often included in frameworks but just wondered if you did anything with them in your book? thanks Jonathon
  14. Both should be "running". MySQL starts for mine on start up, but I have to "start" Apache. You obviously need both to do this. You can use PHPMyAdmin with XAMPP it comes pre packaged http://localhost/phpmyadmin/index.php If you load http://localhost/ what is returned? The XAMPP success page? yes the htdocs folder is where you need the files to go, that is essentially the web root in XAMPP terms As for the busy error Google it, could you perhaps have Skype or something else using Port 80?
  15. Or get a good editor with syntax highlighting, then when you miss something like this you can tell as the colours don't match up
  16. Probably not with Windows, they are quite lax i find in file permissions. The txt file should go inside the htdocs folder along with the script you're using. What is the code for the script?
  17. No its different in the sense that php for the web a more introductary text. PHP and MySQL is a more advanced text.
×
×
  • Create New...