Jump to content

[SOLVED] Using defined variables


cheechm

Recommended Posts

<?php
define("SITE_NAME", "My Website");
print "Welcome to the official website of " . SITE_NAME;
?>

 

Additionally, you can try the following:

<?php
$name = $_GET['site_name'];
print "Welcome to the official website of " . $name;
?>

Just access your page via yourpage.php?site_name=website

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.