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
Multidimensional array problems in $_POST
I'm having trouble with a three-dimensional $_POST array. It starts as a two-dimensional array on th
UL and LI Add Form
The idea I want here is when the user click on a character name from the drop down select bar at the
How to ... (FAQs)
... get e-mail notifications
As several people asked how to get e-mail notifications when new posti
Scrolling news bar and MySQL
I am not sure if this is the correct forum to post this on. If not, I apologize. I am still pretty
Captcha problem users just refresh and it will let them auto submit again
Users will just re submit and not have to enter the new captcha.. ? Lol but if i refresh the page, t
FTP Programs
Here is a list of commonly suggested FTP Programs to use:
FileZilla
SmartFTP
CuteFTP
How can I get my program to read a larger array ??
Hi:
I have this program that reads from an array to do calculations. The array are just t
problem with array - multilingual page
this is my test page :
Code: <?php
if(isset($_GET['lang'])) {
if($_GET['la
SWF image using php?
Hello once again.
My latest en devour requires me to produce an image of a static .swf that i
Install page
How do I make it so when a user submits information on the Install page, it'll right it into the cor