Short of a bridge, of course.
The code I am looking at is http://www.zimmertech.com/tutorials/php/25/comment-form-script-tutorial.php
I figured out how
include ("header.php");
works, but its not working when placed in the two key php files. I took out
//Please set the following variables for your mysql database:
$db_hostname = "localhost"; //usually "localhost be default"
$db_username = ""; //your user name
$db_pass = ""; //the password for your user
$db_name = ""; //the name of the database
/*MYSQL DATABASE CONNECTION/ TRACKING FUNCTIONS
--------------------------------------*/
// connect to database
$dbh = mysql_connect ($db_hostname, $db_username, $db_pass) or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ($db_name);
which is fairly insecure as is.
So in adding the header.php code. Result:
Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /home/******/itanshi/fanforge.net/inc_rate.php on line 233
*
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/***/itanshi/fanforge.net/inc_rate.php on line 233
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
So, I thought to include
include("includes/pagesetup.php");
Fatal error: Call to a member function assignInclude() on a non-object in /home/***/itanshi/fanforge.net/includes/pagesetup.php on line 63
What I'd love to do is place {comments} or something similar in a .tpl.
I am rebuilding efiction! Join us on irc! #efiction at
The code you're looking at is pretty insecure itself (and five years old :O)... Like this:
$tuturl = $_POST["tuturl"];
$tutid2 = $_POST["tutid2"];
$name = $_POST["name"];
$url = $_POST["url"];
$email = $_POST["email"];
$message = $_POST["message"];
$sendcomment = mysql_query("INSERT INTO comments SET tutorialid='$tutid2', name='$name', url='$url', email='$email', comment='$message', date=now()");
See: http://xkcd.com/327/ π
As a starting point for error 1: eFiction uses dbquery() instead of mysql_query(). I'm not sure how that will affect error 2 though! I'm not entirely sure how you're going about doing this.
archive:
site:
Available for skin/mod commission! π
Another route would be to create a new type of review and just use the reviews.php file. You can probably use the reviews in the recommendation module as an example.
I saw that when I was fussing with it, that would work better. Thanks.
I am rebuilding efiction! Join us on irc! #efiction at
