Page 1 of 1

PHP Variables

Posted: Tue Mar 13, 2007 11:04 pm
by abacchus
hi i am new to php and i am trying to create a variable for instance

$servername = "http://190.11.24.80";

and assing it to a button with mix html and php

href="<?php $servername ;?>/contact.php />

where contact.php is stored on the root of that server

but the variable doesnt work and i dont get any syntax errors.

thanks

Posted: Tue Mar 13, 2007 11:44 pm
by feyd
You may want to add "echo" before the variable. Without it, you're basically doing nothing.

Posted: Wed Mar 14, 2007 6:03 pm
by abacchus
thanks that helps