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
Better Method of a Member Cloud
I assume most people know how tag clouds work, where the tags most used are bigger and the least use
LIMIT $start, 10... how to pass last value queried into next page with GET??
Ok I know how to display the first or last 10 results of a query...
$result = mysql_query(&q
Access website from only 1 computer...?
One of my customers wants his website to only be accessed by people in which they bought the website
foreach loop, assistance request
I would like some guidance on the usage of foreach as I try to parse through a large database and wh
Sending UDP Raw socket
I truly need help on this. I am trying to write a test program that simulate a network environment
php title problem
Hi,
I am having a problem managing my page title with PHP.
Currently I have my <
Coding Critique
I was hoping someone could take a second and look down my code and see if they see any problems with
ASP.NET Validation Event Cycle
Hi,
I have asp button as follow:Data type mismatch
Hi,
I am migrating data from algol to c.I mapped real datatype in algol to double datatype in
Unidentified index error in a simple form
I have been trying to make an HTML form that is handled by a PHP script. So far my attempts to get i