i have no idea why this isn't working
Posted on
16th Feb 2014 07:03 pm by
admin
Code: <?php
session_start();
include("connect.php");
error_reporting(E_ALL);
ini_set('display_errors', '1');
$username = "Master";
$password = "pword";
$host = "localhost";
$database = "Ustack";
// Make the connect to MySQL or die
// and display an error.
$link = mysql_connect($host, $username, $password);
if (!$link) {
die('Could not connect: ' . mysql_error());
}
// Select your database
mysql_select_db ($database);
$url = mysql_real_escape_string($_POST['url']);
$tags = get_meta_tags($url);
$username1 = $_SESSION['username'];
$url = mysql_real_escape_string($_POST['url']);
$name = mysql_real_escape_string($_POST['title']);
$description = $tags['description'];
$keywords = $tags['keywords'];
$ip = $_SERVER['REMOTE_ADDR'];
$query = "INSERT INTO Stacks";
$query .= "(`username`,`hyperlink`,`name`,`summary`,`info`,`keywords`,`ip`,`posted`) VALUES ('$username1','$url','$name','$description','$description','$keywords','$ip',NOW())";
$results = mysql_query($query, $link);
if($query){
print "
<font color=white>Your webpage has been stacked. <a href='menu.php'>Return to Stacker</a></font>"; }
else {
print "No url selected/uploaded";
}
// Close our MySQL Link
mysql_close($link);
?>
its not inserting into mysql, i get no errors... whats the problem?
No comments posted yet
Your Answer:
Login to answer
265
54
Other forums
webpage with (simple) login & mysql-db
Hi all,
What I was looking for before was a multi-user password manager, web-based! The offer
links using header()
Hi All
I'm not sure where to ask for help on this but I hope someone can offer some. I'm at
Warning message
I've put a website that I was doing live and I'm getting this warning message when I try to add a ne
Place specific image in html page when specific name is typed.
Hello,
Fairly new to PHP and was curious if someone might know how to solve a fairly simple r
I need an iframe that calls up a different page according to the date
hi
I don't know any php (only html) and I urgently need to do the following:
I need a
PHP Function Page Advice
Hi All, I am quite new to PHP and Javascript but have written an Online Shop (Mainly for Fun and edu
Warehouse Management
Hi,
On our system, we have two storage locations ( A and B ) where A is the main factory
PHP Array quick help
I need
$_SESSION{'username'} to be like this:
if $_SESSION['username'] = "gay
login to other site by sending post variables
hey,
here is my problem: my school gave me a mail account for school-stuff use. they mail us
Drop Down and text box issue
Is it possible to set a drop down list and text boxes to a certain width?
here is my code