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?
How to generate a text file using php...?
Hi, Can anyone give me code to generate a text file using phpThanks in advance
sql error
I have been looking at this code for 20mins and can't work out what I am doing wrong. There is something wrong with my sql statement below is the error and the code. what I am trying to do is to edit
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 very big.maybe in some cases there are un-optimal functions, I mean functions that I can improve them to get
MFC GUI Programming
I am working on a project right now that requires me to create a MFC Windows GUI. Basically it needs to be able to pop up after hitting a button from another main application which would also be a
rand() function
just a general question guys a girls, is the rand() function 100% random or is it based on time?
Get to know your fellow coder
I think it's time we got personal around here. There's a lot of code swapping and a few members know a little more about the others, but the vast majority of us are nothing but coders passing in the
Multiple upload and Resize
I would like some help on my script I have the for my index.php////<html><head><!-- Include the javascript --><script
disable all input buttons
Hello Friends,suppose i do have a file ( file.php ) has a submit buttonCode: [Select]<input type=submit name=add value=go> is there any way so i can make the button shown but in same
FTP Programs
Here is a list of commonly suggested FTP Programs to use:FileZillaSmartFTPCuteFTPRightFTPCoreFTPJFTPFireFTP
Ariba 9r - SAP MM Integration
Hi experts,