PHP Variables

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
abacchus
Forum Newbie
Posts: 2
Joined: Tue Mar 13, 2007 10:56 pm

PHP Variables

Post 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
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

You may want to add "echo" before the variable. Without it, you're basically doing nothing.
abacchus
Forum Newbie
Posts: 2
Joined: Tue Mar 13, 2007 10:56 pm

Post by abacchus »

thanks that helps
Post Reply