Hello,
I have a variable that I want to pass into my include file but not sure how to do this
say i have this in my index.php file
<?php
$new_id = $row['id'];
include('main.php')
?>
How would my $new_id get passed into my main.php file?
I'm trying to insert information into a database that is in my main.php
mysql_query('INSERT INTO comments (id) VALUES ($new_id)')
but my $new_id in main.php can not recognize the variable.