Re: Im new to this but...
| From: | Micah Gersten | Date: | Tue, 02 Sep 2008 19:32:16 +0000 |
| Subject: | Re: Im new to this but... | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-45304@lists.php.net to get a copy of this message | ||
In the HTML, you either need to use <?php echo $title; ?> or, if you
have short tags on, <?= $title ?>, not <?php $title ?>.
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com
Chris Hale wrote:
> I have:
> Apache 2.0.59
> MySQL 5.0.41
> PHP 4.4.7 & 5.2.5
>
> and this is my program:
>
> <?php
> session_start();
> include("includes/functions_main.php");
> include("Vars.php");
> ?> <?php get_header(); ?>
> <?php get_sidebar(); ?>
> <?php
> $page = '$_GET[page]';
> $cxn = mysqli_connect($host, $user,$passwd, $database) or die
> ("Can't Connect.");
> $sql = "SELECT * FROM page WHERE id=$page";
> $result = mysqli_query($cxn, $sql);
> $row = mysqli_fetch_assoc($result);
> extract ($row);
> ?>
> <div id="column_right">
> <div class="content">
> <h2><?php $title ?></h2>
> <?php $content ?>
> </div>
> </div>
> <?php get_footer();?>
>
>
> But i get an error every time. I have read PHP and MySQL for Dummies
> to get me started but none of the things in the book seem to work for
> me. It is very frustrated. I dont know whether it just my lameass host
> provider that hasn't set the mysql properly.
>
> I would appreciate any help.
>
> Thanks
>