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

Removing Title From database problem
Hi again ! i am having an issue with updating database. When i update any price of a title it remove

dropdown menu
Hello everbody,

I am php newbie.
I need to develop a program that once click the drop do

some query on multilingual website
Hi all,

Which is the simplest and easiest method to make a website multilingual,
is it put

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result
what is wrong with this

Code: [Select]<?php
if ($_SERVER['HTTP_REFERER'])
{

browse folder only
hi,
is there a way i can browse or get the directory or folder only and not the file?
i just w

mail() problem
Hi Guys,

I've set up a contact email form. It sends the information fine, but it sends it to

WELCOME SCREEN
first of all let me tell you what does my script do,

it´s a very simple query to show a e

update the selected existing records of database
Hi frndz,
I am new to php and get stuck....

Edit.php > Update.php > Updatea

New Search Engine problem
Hey everyone,

I have a ZIP Code Radius search engine already functional. it displays all of t

Passing JS to PHP
So I have the following
Code: <?php
getdetails(?><script type="text/

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