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 Like 54 Dislike
Previous forums Next forums
Other forums

Spaghetti Code
So.

I've pretty much reached the point where I have so many isset s on one page that I can't

problem with GROUP BY and ORDER BY
i usually use this query to display the last 10 entries from a sql table:

Code: $query = &quo

Aris, Netweaver BPM, Visual composer and X'app
Dear Experts,

Whats the relationship between the following components: Aris, Netweaver BP

FFmpeg Images 2 Video conversion problem ??
I got folder full of images , number of images = 600 , I want to make a video which plays one image

Email logic not working
I would like to send an email using the php email() function then if it does execute i.e sends i wou

How to insert random unique values in 2 columns ?
I have table with 2 columns

Create Table code_for_code (
first_code varchar2(10) uni

Convert .fdf to .pdf
I currently have a web form that uploads the form data to an .fdf file and emails it.

However

Can you help please? Php file
I have to write this php file to allow users to register their nicknames on nickserv

For an I

how do i display data on a page from mysql
1 - do i use this code at the top of each of my page i wish to only alow access if there as been a s

iMatch stored value with the current value in a loop
Hello,

I have a MySQL db were I store articles in.

I have a form to fill these article

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