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
"From field" in PHP email form
I used a wizard to create a PHP email form. I was able to customize it with the exception of the Fr
for loop without same $i digits?
Hi,
Can some guru please advise how can I accomplish this with a simple for loop ?
I
Validating time
Hi Guys
what do you think of the following approach to validate a 24hour time:
http://
PHP Form to Variable.
Hi! I have written a HTML-form code in DreamWeaver CS3 (in a PHP doc) and I really need it to work s
Remove values in array2 from array1
I have two arrays.
Array 1 is where the array key holds various different numbers. For exampl
Save remote XML to local website folder
Hi, I hope you can help me out. I would like to be able to pull an XML file from another site and t
Page doesn't expand for content
Hi. I've been testing a query I made. It's here http://lapr1.6te.net/inquerito.php
The page doesn
Undefined offset when using a flat file with pipe symbols
Hi, I've got a flat file/text file which I'm currently using as a member database for my site (not a
Form help: Syntax & Logic
Hello again all,
I'm working on a form and ran into a wall (again) and can't seem to think th
problem with array - multilingual page
this is my test page :
Code: <?php
if(isset($_GET['lang'])) {
if($_GET['la