omg! i just entered wrong verificataion code and it deleted my whole post… well what a great start
Anyway, hi everybody
This is my first post.
I’ve started using php only recently, after reading recommended books (incl. php and mysql web development by addison-wesley) and watching comprehensive video tutorials (CBT Video2Brain etc. if that rings a bell), which took me many many hours.
Now I want to see if I understood it properly and want to create a search form from scratch, that displays search results underneath it.
This search page should also then be integrated into a Joomla CMS based website (starting a business with a friend) -> would be nice if anyone could tell me if it’ll work without problems, and if not, what should be done so it does work.
Now this is the problem I’m having:
The php code in the file is showing up as text in the html document when i open it in a browser.
Am using xampp package with Apache server 2 and php 5.2.0 (are these maybe the problem?).
Any suggested improvements/fixes to the code would be really appreciated.
Here’s the code:
[php]
Search Parts Ricerca Componentip.f. scegliere prima categoria
-- Categoria --
<?php
if (isset($_POST['categoria']) && $_POST['categoria'] == 'frizioni') {
echo 'selected="selected"';
} ?>Frizioni
<?php
if (isset($_POST['categoria']) && $_POST['categoria'] == 'marmitte') {
echo 'selected="selected"';
} ?>Marmitte
<?php
if (isset($_POST['categoria']) && $_POST['categoria'] == 'pinzeFreni') {
echo 'selected="selected"';
} ?>Pinze Freni
<?php
if (isset($_POST['categoria']) && $_POST['categoria'] == 'catalizzatori') {
echo 'selected="selected"';
} ?>Catalizzatori
Modello
Sgl. Motore
Cilindrata
Anno
Numero Articolo | Marca | Modello | Cilindrata | Anno | Sigla Motore | Prezzo |
---|---|---|---|---|---|---|
%s | %s | %s | %i | %i | %s | %d |