Jump to content

F1racer328

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

F1racer328's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi everyone. I have a php mysql class and was wondering how I declare a varialbe kinda thing. Here is the code in the mysql class.... <?php // class stuff public function fetch_array_from_query($query) { $this->debug_write("Fetching array from given query"); if(!$this->is_connected()) $this->setup_connection(); $result = $this->query($query); $this->debug_write("Finished fetching array from given query"); $array = $this->fetch_array($result); return $array; } How would I echo $array out of the class? I can do echo $array inside the class and it works fine, but if I try to do something like <?php global $db; $db->fetch_array_from_query("Stuff here"); echo $db->$array(); ?> It doesn't work... :S Thanks
  2. Hello. I've created a image upload script. The script will upload and put an image at say http://mysite.com/files/testimage.png But I want it to be like http://mysite.com/testimage Any idea on how to do this? Sorry if this is already posted.
  3. Hello. Just was wondering how to do this. So heres the idea. I have an image script that uploads to say http://mysite.com/files/coolimage.png But I want the URL to by say http://mysite.com/coolimage I know this is possible but how? Thanks
  4. k. Found a way <?php switch ($_GET['go']) { case "1": $inc = 'Page01.php'; break; case "2": $inc = 'Page02.php'; break; case "3": $inc = 'Page03.php'; break; case "4": $inc = 'Page04.php'; break; default: $inc = 'Page01.php'; break; } include ($inc); ?>
  5. Hey guys just wondering. Very simple php question. Im still little n00b at php but bear with me. <?php switch ($_GET['page']){ case'home': echo"home page codez here"; break; case 'register': echo"register"; break; } ?> So I have that code. The URL would be mysite.com/index.php?page=home And I would get that php echo page. How would I go with this to display say a already made page in html. Say I want to display http://mysite.com/news.php which is just plain html. And I want it to display on index.php? Any ideas? thanks
×
×
  • 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.