Jump to content

jlhaslip

Advanced Member
  • Posts

    524
  • Joined

  • Last visited

Everything posted by jlhaslip

  1. The period is a concatenation operator. It separates different parts of the string to be echo'd out. echo "This part " . $this_variable . " and another part. "; Notice also that the same output can be done using single quotes: echo 'This part ' . $this_variable . ' and another part. '; Or Double quotes as you suggest: echo "This part $this_variable and another part. "; Test script: $this_variable = "This Variable"; echo "This part " . $this_variable . " and another part. "; echo 'This part ' . $this_variable . ' and another part. '; echo "This part $this_variable and another part. "; ?> The biggest difference is that the single quote stuff does not get 'parsed' and it will be faster on the Server. Not a big deal on a small script, but it can bog down on a larger script.
  2. Safe trip. Good luck with the move. Enjoy the volunteering.
  3. Place this line in the top of your php file. error_reporting(E_ALL); ini_set('display_errors', 1); // set to '1' for display errors on screen
  4. $result = mysql_query($query); //Query runs. $num = mysql_num_rows($result); //check for number of rows returned from query echo 'Num Rows is : ' . $num . ' ' ; // add this to see what your num_rows value is being reported as if ($num > 0) { //since only one row can be returned, this means name was found in database, so print the name with message echo $name_first .' ' . $name_last . ' is in the database. Would you like to add slips now?'; } else {//name not found in database because it hasn't been entered yet, so print form input and message echo $name_first .' ' . $name_last . 'is not in the database. Would you like to sign up' .$name_first.' now? '; } ?> Try this.
  5. It would help us if you posted the error messages you are receiving.
  6. The page position is the same in 800 x 600 or 1024 x 800 or even when I scroll down to 200 x 200px, so it is using a percentage of the Screen resolution. The Laptop I am on uses a 1280 x 780 display, so I can't check it on any larger screen sizes.
  7. Change the padding-top on the inner_wrapper Div to a percentage to suit your needs. Worked for me in FF3 using 20%, 10% and 5% just fine.
  8. if ($num > 0) //since only one row can be returned, this means name was found in database, so print the name with message { echo $name_first . ' is in the database. Would you like to add slips now?'; } else {//name not found in database because it hasn't been entered yet, so print form input and message echo $name_last . ' is not in the database. Would you like to sign up ' . $name_first . 'now? '; } Try that. You had not added any data from the Mysql search to any array, so $row was empty. Echo out the Search values only according to the IF statement. Since there are only two possible outcomes (found/not found), I removed the IF/ELSEIF and made it an IF/ELSE. *not tested*
  9. hey, Susie, ... My friend won't be available for a few days. Probably all week or 10 days.
  10. Check for the number of rows returned from the query. http://ca2.php.net/mysql_num_rows
  11. Susie, I don't do Flash, but have a friend who does. I will check to see if he is able to mod the file for you and advise as soon as I hear back from him. I'll simply pass on this link to him, and he might contact you (or not).
  12. XAMPP installs Apache, php, mysql, phpmyadmin and several other packages for you. I have never installed WAMPP, but I'm fairly certain that they also install the required packages as a one-click installer similar to XAMPP. As for phpmyadmin creating php code, you will usually find that the 'create php code' selection is available on each step *after* you do something. You need to create any new databases yourself on the front page of phpmyadmin. They provide some sample databases, usually, and each install (should) include a 'test' database named 'test'. For example, when you run phpmyadmin, and select a Database from the left hand column, then a table from the left hand column, it displays the table contents. The php code is available for the mysql query that is used to display the Table contents. Likewise, after you use the Browse button, or after you enter some SQL code, it provides the option to have the php code displayed so that you can cut and paste it elsewhere. As a 'beginner', it would be wise to install either WAMP or XAMPP since they remove many of the issues you would have by installing the components yourself. After the package is installed, play around with the features. You really can't lose anything at the start. The worst thing might be having to re-install the whole thing, but not a biggie.
  13. Google found this for you. http:/ /www.hot scripts.com/listing/email-with-attachments-php-script/
  14. use overflow: auto on the outer div
  15. tried this yet? /* hover state */ #main_nav li:hover a.home, #main_nav li a.home.current{ background:url(home_hover.png); }
  16. You might need to delete the "hash mark" fromin front of the body tag in the css file. It would be looking for
  17. No, only a single 5kb image would be transferred across the Interweb. And usually only once, because your Browser will cache the image if the page is using an external CSS style sheet. An image of several hungred KB can be quite slow for dial-upusers. Yes, a 1 x 1 px size image will cover the entire body element by repeating itself.
  18. Difficult to convert directly from a Table to a css layout. I have always found it easier to start over with a fresh page. Browse through other Template sites. Many of them are free/open source and allow modifications. That design shouldn't be difficult to find a replacement for.
  19. And what is the error you are getting?
  20. try adding "./" (without the quotes) to the image path. Also, check the folder names. Picture is not the same as Pictures or picture on some systems. As well, avoid spaces in the path or filename. *edit* Might be easier to move the image to the same location as the html file??? because once you ftp the pages up to a Server, the file structure will change and the relative addresses will be ineffective.
  21. Start with this one: http://www.killerphp.com/mysql/
  22. No Doctype, Table based layout, Spacer gif's, all so 90-ish. The page 'looks' good, but not exactly 'current' design techniques. Using Firefox Firebug extension, there are no 'errors', but lots of warnings. What sort of issues are you having? Most of the members here would suggest you develop the page in a Div-based/CSS layout with a correct Doctype to work cross-browser, which is a major change for this site. It would look as good, work better on most Browsers and save bandwidth if done properly.
×
×
  • Create New...