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?
265
54
Other php-forum
Include with Parameters
In a particular page I would like to include a file that requires $_GET parameters.
when I go
php slowing my site?
Hi all,
I think that one of the reasons that my site doesn't work fast is that the code is ve
explode() function problem maybe
Hi I'm having trouble searching my database. When I type two words in the search field it only searc
Is it possible to view php source code??
Hi All
I was just wondering if it's possible to view a websites php source code?
I know
How to replace search button with link?
hi to everbody.
i have a search submit form and button like this :
<form id="f
Do not allow posting of whitespace
Currently the script below works if the user does not type a name/message, but if i create a whitesp
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
Trouble checking SESSION cookie
I am trying to use $_SESSION cookies to verify admin privileges .
I don't understand why this is
question about header() security
is is safe to just use the header() function to redirect someone if they are, say, not logged in? or
Add User script "Could not execute query"
This should be an easy script but I can't get it to run. Can someone please help me?
<