huh....i finally got this figured out.
there were two files that i was using(that i did not write the inital code for):
login.php
login_form.php
login started with:
switch (@$do)
and then ran through the different cases:
login
new
default
the form that was being used, was set up in login_form.php and the submit actions ie:
<form action="login.php?do=login" method="post">)
set up the different cases on login.php
to test adding the mysql statements to enter default items into the database, i just copied login.php and renamed it to login_test.php. I wasn't smart enough to look at login_form.php, until this morning ( i guess it serves me right, for not writing my own code!).
i was running into problems (no errors were showing up with mysql_error()😉 b/c whenever i submitted info, it was referring back to login.form not login_test.form.
after i saw this, i renamed the actions and any other references to login.php or login_form.php and was able to figure out how to add multiple items, based on the errors generated.
this is what i came up with:
$sql = "INSERT INTO MemberInfo (LoginName, Password, LastName, FirstName, Home, Email, Joined, Approved)
VALUES ('$newname',password('$newpass'),'$LastName','$FirstName','$Home','$Email',CURRENT_TIMESTAMP(),'$Approved')";
mysql_query($sql);
$sql_default_links_entry1 = "
INSERT INTO Link_Info(Link_ID, UserName, Link_Display, Link_Description, Link_URL, Category)
VALUES ('', '$newname', 'Petersons Education Portal', 'The most comprehensive and heavily traveled education resource on the Internet.', 'http://petersons.com', 'Education')";
mysql_query($sql_default_links_entry1) or die (mysql_error());
$sql_default_links_entry2 = "
INSERT INTO Link_Info(Link_ID, UserName, Link_Display, Link_Description, Link_URL, Category)
VALUES ('', '$newname', 'mba.com', 'Info regarding the GMAT and MBA programs, provided by the Graduate Management Admission Council.', 'http://www.mba.com', 'Education')";
mysql_query($sql_default_links_entry2) or die (mysql_error());
$sql_default_links_entry3 = "
INSERT INTO Link_Info(Link_ID, UserName, Link_Display, Link_Description, Link_URL, Category)
VALUES ('', '$newname', 'PHPbuilder.com', 'Resource for PHP tutorials, templates, PHP manuals, content management systems, scripts, classes and more for the PHP developer.', 'http://www.phpbuilder.com/', 'Computers & Internet')";
mysql_query($sql_default_links_entry3) or die (mysql_error());
it seems to be working. i've signed up a few test members and have entered a couple hundred entries into the database as a result.
i would like to move this query to another file, to keep the lines on this file down... maybe i'll try using an include.
thanks for your help. i really appreciate it.
now, on to the next problem.....
cheers.