Jump to content
Larry Ullman's Book Forums

Nate

Members
  • Posts

    2
  • Joined

  • Last visited

Nate's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I just figured it out. Its a stupid N00B mistake. In Netbeans if you open a new file under your current project you have some base option including a php file or a blank php web page. all of the html files in the book need to be built a a "PHP Web Page" NOT an HTML or XHTML page. Netbeans makes all the code highlighting and php interpretations based on that initial configuration.I really like Netbeans nice configurations, code highlighting, and code completion, but some of the initial configuration for new files can be skipped over too easily. I just need to slow down ad read the initial config options more carefully. I hope this helps others.
  2. HI all, I am in chapter six at the end when we are building the FOR loop. I am having a problem with netbeans rendering the php in the html. Is anyone else having this problem. I have tried the following, I have restarted Netbeans. I have commented out the section and retyped it. I have copied another php section from handle_reg.php and it does not render either. I have cut out the php script, saved, restarted netbeans, and retyped the script. I have gone character by character comparing syntax with the book, everything is as the book has it. here is the code I am writing. <p>Date of Birth: <select name="month"> <option value="">Month</option> <option value="1">January</option> <option value="2">February</option> <option value="3">March</option> <option value="4">April</option> <option value="5">May</option> <option value="6">June</option> <option value="7">July</option> <option value="8">August</option> <option value="9">September</option> <option value="10">October</option> <option value="11">November</option> <option value="12">December</option> </select> <select name="day"> <option value="">Day</option> <?php <--this is marked in Netbeans as a misspelled word. Also this whole section is not color coded as other php scripts in the same project are. for ($i = 1; $i <= 31; $i++) { print "<option value=\"$i\">$i</option>\n"; } ?> </select> <input type="text" name="year" value="YYYY" size="4"/> </p> When I run this in the browser (chrome latest version) the drop down only shows "Day" as an option, When I copy the Select statement in question to handle_reg.php and run it in the browser it rruns just fine i see a drop down with 31 numbers. Is there a setting in netbeans that is not allowing php to render inside html? I don't think so because it works in every other page? I am stumped! Any ideas?
×
×
  • Create New...