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

php calculate
this code echoes correctly the sum but the inserted result is 0??
Code: <?php
$TotalNum

Revoking alter any table from a schema
Hi All,

i am working in Oracle 10g.
my requirement is to revoke all kind of DDL oper

PHP Surveys
I really would like some advice.

If you have a client come to you asking for a survey to be d

xApp Analytics in BI 7.0
Dear all,

I am trying to implement xApp Analytics in BI 7.0. After I installed the analyt

jquery validation in codeIgniter
hai i need to add client side validation to my fiels which are selected in a forloop.the fields are

PHP submit form script causing blank page
Im trying to submit a form using this script, however nothing shows up on the page, does anyone know

button help
i originally had this but realised it is much easier to have a button.

Code: <?php

question about header() security
is is safe to just use the header() function to redirect someone if they are, say, not logged in? or

how to get sn motherboard
Hello.
I want to get serial number motherboard, cpu and else hardware.
Can You show me sam

Run function every 5 mins ??
I have a function PostMessage()

How can I run it every 5 mins ??

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