Ok, here is the code i am trying:
ad_link_process.php
PHP Code:
<?php
require ("includes.php");
$filename = "featured_links.php"; // file to write to
$date = date("F j, Y"); //date format
$error = "An error occured while adding new link!";
// Add Text
$text = stripslashes($_POST['text']);
if (!$text) {
$text = "<b>Untitled</b>";
}
// Add Link
if ($link = stripslashes($_POST['link'])) {
$add = '
<?php
$linkurl = "'.$link.'";
if ($user = "jexlinks") {
print ("<a href="'.$linkurl.'">'.$text.'</a> <a href="delete.php">Delete</a>");
}else{
print ("<a href="'.$linkurl.'">'.$text.'</a>");
}
?>
';
$links = file_get_contents($filename).$add;
$file = @fopen($filename, "w");
@fwrite($file, $links);
@fclose($file);
$message = $success;
}
else {
$message = $error;
}
require ("link_added.php");
?>
Delete.php
PHP Code:
<?
str_replace("$text", "", "ad_link_process.php");
?>
<html>
<head>
<title>Delete String</title>
</head>
<body>
Link Deleted!
</body>
</html>
Its just simple right now, but the lines are added to featured_links.php without an issue, but nothing is displayed when i try to access that page : / . Not really sure about all the code, but its just the concept i had in my mind
Bookmarks