Forum Moderators: coopster
anyways It seems not to work heres my coding for whatever.php (where the coding is):
<?php
include ('mysql_connect.php');
$terms = "POST('terms')";
$terms = "http://inventory.overture.com/d/searchsuggestion/?term=<POST('terms'>";
$query = "INSERT INTO terms ($terms) VALUES ('$terms')";
$result = @mysql_query ($query);
echo "$terms";
?>
and It seems not to work PLZ help me THANK-YOU
ALSO I did set the mysql_connect.php page
[edited by: coopster at 8:32 pm (utc) on Mar. 12, 2005]
[edit reason] removed urls per TOS [webmasterworld.com] [/edit]
<html>
<title></title>
<body>
<form action="whatever.php" ENCTYPE="multipart/form-data" method="post" name="terms">
<INPUT TYPE=file name=terms><input type="submit" name="submit" value="Submit" /></FORM>
<div align="center"> </div>
</form><!-- End of Form -->
</body>
</html>
Page 2(php coding to send to database)
<?php
include ('mysql_connect.php');
$terms = "POST('terms')";
$terms = "http://inventory.overture.com/d/searchsuggestion/?term=<POST('terms'>";
$query = "INSERT INTO terms ($terms) VALUES ('$terms')";
$result = @mysql_query ($query);
echo "$terms";
?>
Page 3 (database display)
<?php
$page_title = 'View the Current Users';
require_once ('mysql_connect.php'); // Connect to the db.
// Make the query.
$query = "SELECT CONCAT(terms) AS dr FROM terms ORDER BY terms ASC";
$result = @mysql_query ($query); // Run the query.
if ($result) { // If it ran OK, display the records.
echo '<table align="center" cellspacing="2" cellpadding="2">
<tr><td align="left"><b>Name</b></td><td align="left"><b>NAME</b></td></tr>
';
// Fetch and print all the records.
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
echo "<tr><td align=\"left\">$row[0]</td><td align=\"left\">$row[1]</td></tr>\n";
}
echo '</table>';
mysql_free_result ($result); // Free up the resources.
} else { // If it did not run OK.
echo '<p>The users could not be displayed due to a system error. We apologize for any inconvenience.</p><p>' . mysql_error() . '</p>';
}
mysql_close(); // Close the database connection.
?>
include ('mysql_connect.php');
$uploadfile = $uploaddir . basename($_FILES['userfile']['name']);
$filepointer = fopen($url,"r");
if($filepointer){
while(!feof($filepointer)){
$buffer = fgets($filepointer, 4096);
$file .= $buffer;
}
fclose($filepointer);
}
echo '<pre>';
if (move_uploaded_file($_FILES['userfile']['tmp_path'], $uploadfile)) {
echo "File is valid, and was successfully uploaded.\n";
} else {
echo "Possible file upload attack!\n";
}
echo 'Here is some more debugging info:';
print_r($_FILES);
print "</pre>";
?>
IF anyone may know please help I'd appriciate it
It may help if you explain what you are trying to accomplish and exactly what errors you are getting. Also, please review the PHP Forum Charter [webmasterworld.com] regarding Posting Guidelines.
<?php
$terms = $_POST['terms'];
$url = "http://inventory.overture.com/d/searchsuggestion/?term=".urlencode($terms);
$page = file_get_contents($url); // PHP 4.3 and above
$page = mysql_escape_string($page);
mysql_query("insert into terms set terms='$page'");
?>
However, this will only store the page into your database. If you want to use the actual suggestions later on you'll need to parse them out with preg_match_all().
Im trying to take a file (.txt bounch of keywords) and take overture.com combine them and make all the ovt scrores used goto my database and when i mean keywords I mean 1 on each line
[edited by: jatar_k at 9:00 pm (utc) on Mar. 14, 2005]
[edit reason] no urls thanks [/edit]