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");

Did you know?Explore Trending and Topic pages for more stories like this.
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 Like 54 Dislike
Previous forums Next forums
Other forums

how to use two buttons with php
hi i have one form. there are three fields which are to be filled by the user. and then there are tw

Beginner question regarding Array's
Hi everyone, the page im working on has an array of variable at the top...

Code: $define_li

Session variable help
I'm having a very troubling issue. Maybe I'm just looking over something but I have looked at the co

defining website tags
Hi,

What would be the best way to define tags for my site, such as website title, url etc.

How to use Substr
I want to check for the word CATEGORY: inside a string which can be CATEGORY: ITEM
and remove the

Putting double spaces instead of single spaces
Im looking at trying to replace all single spacing between fields with double spacing

At pres

import table with dependency
Hi

What is the best way to import table back which has dependency?

SQL> cre

Echo Tweaking help!
HI. I would like to have the output of the entered variables repeat forever, but it's stopping at th

How do I get the row number from from an sql table query
Hi all

I have a table that I query and it returns a number of rows.
mysql_num_rows($query)

how to load php class from another domain?
how to load php class from another domain?

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash