OkaY so I got my blog to actually save the posts and whatever, all I need now is for it to keep the right posted. That database is set up to keep post id, title, subject, date, and author. The only problem is author. It won't post the right author, i need it to put the username of the poster in that spot but it either puts nothing or if I put it to ["user"] it puts Array in the field.... so please help, how do I save the username? Here is my code in post.php
<?php include "../config.php"; include "../func.php"; include "../english.php";
$subject=clean($_POST["subject"]);
$name=($_SESSION["name"]);
$inhoud=clean($_POST["inhoud"]);
if (($_POST['post'])&&($_SESSION["code"]==$_POST["code"])) {
$query="insert into `babys` (`name`, `subject`, `content`, `date`) values('".$name."', '".$subject."', '".$inhoud."', now())";
$result = mysql_query($query);
if ($result) header('Location: index.php');
else msg("Failed.".mysql_error());
} else {
msg($lang['incorCode']);
}
?>
Delete HTML file after loading
I have limited experience with php and its been a year or two since I've last used it. I have a small web application where I want to make sure the data presented on a page (currently an HTML file)
Send inserts to mysql thru port 80
Hi!I have an application that must do some inserts in a mysql db. This db is behind a firewall, and only port 80 is available.My first thougt is to use xml or csv, and in some way parse that using
replacements
I have a variable in my PHP script like ASSFDDDDDDDDDDDDDASDDDDDDDDARYTRHKKHHHHHHHHHHH and positions 5-10I want to replace these positions with another color .$newpat="<font
Echo multiple lines of html code
Hi guys,I would like to know if there is a way to echo multiple lines of html codes. I intend to echo a form if a variable is set and nothing if it is not set. And right now, I echo each line of html
Anti Spam Code
Ok where do i start? Probably by telling you I have very little working knowledge of PHP and that I have been working on this problem for 3 days and have had no luck!Here we go:I have a rate and
this code is strange !
Hi i got this code from the web.. It checks for live and dead socksIt is working perfectly on my localhost. but does not work in any webserver ! any ideas ?<?php$filename =
IIS & NW MII on the same server
Hi,
There was a problem with the request. (Code: 0)
Any Idea what could cause this? I get it randomly at best. But with both IE and FF. It derives from an AJAX banner rotation script I am attempting to implement. Well have implemented it... And the
function not returning the correct value
I have a program that needs to return a value from a function. I have an output statement inside the function just to see what the output is, and it sems to work. However, upon returning the function
Batch Session SM35 stuck in status 'in Background
Hi Experts,