Hi, I can't figure out why it won't add the record to the database. It's just a simple form to get name and email but when I hit submit I get the "or die" message.
Code: $Fname = $_GET['Fname'];
$eMail = $_GET['eMail'];
$submit = $_GET['submit'];
if ($submit == 1)
{
$date = date("Y-m-d");
$sql="INSERT INTO `my_db`.`my_table` (
`usrID` ,
`usrName` ,
`usrEmail` ,
`usrDatereg`
)
VALUES (
NULL , '$Fname', '$eMail', '$date'
)";
$adduser=mysql_query($sql) or die ('Could not add you to mailing list');
$message = "Welcome to the mailing list! ";
}
It's definitely getting all the variables from the form, I tested by printing them as part of the $message variable but it just isn't adding.
Any thoughts?
Shopping Cart
Can anyone direct me to a Simple, Basic structure of a shopping cart.New to classes. I want to store info in sessions and write to the db.Is this the right approach?newbee.Thanks,
delete comma
HI,How to delete "," at the end of the string.Code: $match = 2009/02/03/a2correx03cvbnm,echo preg_replace("/;$/", "HI", "$match");
Simple Variable Question
Hi everyone.... again,I am really getting into php still. Learning more every day. I love it.But I have run into a problem I cannot solve.From what I understand, you can only "echo
Help with Contact Form
I have this Form on an html page and the associated code on page.php (below).I keep getting the "Please Fill In All Fields" message. Can you help me fix this?I'm sure I'm just missing
PHP & Java
Hello,can PHP code be used inside java code?Code: <SCRIPT LANGUAGE="JavaScript">OpenWindow.document.write("<?php echo NotWorking;
2 decima places & How to reload my page
Hello There,How do i put full-stop (.) after second figure from behind? ie if i have 123456 in my database and i want it to echo as 1234.56Secondly, am designing a shopping website. I want the pages
Sessions work for me and not others?
I'm having a bit of bad luck with sessions. In the past they have worked fine for me, but this time around I'm having terrible luck. Basically, I made the crappiest login system ever. I'm using
PHP and SMS
Hi all forum members. I am new here and am unsure what category shoild I post this in. Moderators: Please excuse me if this is in the wrong category.The problem is that I am assigned with the task of
$_FILES array
Ok,I just started experimenting with PHP today. My goal right now is to have people be able to upload files to my website, but I am starting at square one. I can make a .php print out the name of
Curly Bracket Delimeters.
I'd always believed that the starting and ending delimeters in preg_ functions had to be the same character, but recently discovered that you can use the curly brackets.Example:Code: