Jump to content

Zbrahead91

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Posts posted by Zbrahead91

  1. no, this doesn't seem to work, i stripped the functiuon tags form core and ran it individually with a $pgarea var defiuned and the $page was in the url and it worked fine, this is what is really stumping me, thanjkss for tryin tho :D
  2. i have a home-made function this is thje syntax:

    [code]
    <?php
    #define functions:
    function SELCONT($PGAREA) {


    //assign values to mysql vars
    echo"1";
    $host = "localhost";
    $dbuser = "PageData";
    $dbpass = "pagedata";
    $dbname = "PageData";
    $dbtable = $page;
    echo"1";
    //Establish connections
    mysql_connect("$host","$dbuser","$dbpass") or die("sorryno conn" . mysql_error());
    echo"1";
    mysql_select_db("$dbname") or die("sorryno conn" . mysql_error());
    echo"1";
    //Build query (BETA)

    $query = "
    SELECT
    *
    FROM
      `$dbtable`
      WHERE
      `zone`
      =
      $PGAREA
      " ;

    //Execute and assign

    $find = mysql_query("$query") or die (mysql_error());

    $f = mysql_fetch_assoc($find) or mysql_error();

    $cont = $f["cont"];
    //Print result
    echo("$cont");
    }
    ?>
    [/code]

    on my index.php page which inlcudes this,
    i want it to run this function: SELCONT(1) but it stops the page alltogether! and my html later on doesnt appear  (im debugging so this is what is contained in my index.php file:
    [code]<?php
    echo "Functioning...";

    include("Core.php");
    echo "included core";
    echo "page is $page"; #Stops parsing here by the way
    SELCONT("1");
    echo "selcont ran"
    ?>



    <html>

    <head>

    <title><?php SELCONT(1); ?></title>

    <link rel=stylesheet type="text/css" href="style.css" />

    </head>
    <body>
    <?php SELCONT(2); ?>
    </body>
    </html>
    [/code])


    in my database pagedata is a table HOME this is that home

    [table]
    [tr][td]cont[/td][td]zone[/td][/tr]
    [tr][td]home[/td][td]1[/td][/tr]
    [tr][td]Welcome Home debug successful :D[/td][td]2[/td][/tr]


    [/table]       

×
×
  • 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.