Search found 27 matches
- Wed Jun 04, 2008 3:27 pm
- Forum: PHP - Code
- Topic: Convert SYSDATE() into something more viewable
- Replies: 1
- Views: 216
Convert SYSDATE() into something more viewable
Hi there, Can anyone tell me how I convert the SYSDATE() format 2008-06-04 21:10:01 into something more viewable like: 04/06/2008 21:10:01 in php? I am requesting this from the DB in a loop but I need to view " $row["logged"] " as 04/06/2008 21:10:01 <? $result = mysql_query(&quo...
- Wed Jun 04, 2008 12:38 pm
- Forum: PHP - Code
- Topic: Update MySQL DB from a form
- Replies: 24
- Views: 1124
Re: Update MySQL DB from a form
Sure is 
Many thanks for your support mate, it's appreciated.
I am an ASP guy and this php stuff is very different lol.
Cheers again.
Many thanks for your support mate, it's appreciated.
I am an ASP guy and this php stuff is very different lol.
Cheers again.
- Wed Jun 04, 2008 12:32 pm
- Forum: PHP - Code
- Topic: Update MySQL DB from a form
- Replies: 24
- Views: 1124
Re: Update MySQL DB from a form
HOLD THE PHONE, I have found one thing out. When I uploaded I was in the DB. I refreshed the DB and nothing happened. If I was out of the DB and used the code you provided and then went back into the DB, it had worked. Why is that? I have made changes before and then refreshed and it normally works?...
- Wed Jun 04, 2008 12:19 pm
- Forum: PHP - Code
- Topic: Update MySQL DB from a form
- Replies: 24
- Views: 1124
Re: Update MySQL DB from a form
forget that last error, it should be "access" and not "level"
BUT, the page is still blank
$myrow = $_POST['L_ID'];
mysql_query("UPDATE login SET access = 2 WHERE L_ID = $myrow ");
echo mysql_error();
BUT, the page is still blank
$myrow = $_POST['L_ID'];
mysql_query("UPDATE login SET access = 2 WHERE L_ID = $myrow ");
echo mysql_error();
- Wed Jun 04, 2008 12:15 pm
- Forum: PHP - Code
- Topic: Update MySQL DB from a form
- Replies: 24
- Views: 1124
Re: Update MySQL DB from a form
Unknown column 'level' in 'field list'
- Wed Jun 04, 2008 12:08 pm
- Forum: PHP - Code
- Topic: Update MySQL DB from a form
- Replies: 24
- Views: 1124
Re: Update MySQL DB from a form
Hmmm,
It still doesn't work and if I take out the header page it just goes blank and says Done at the bottom in ie
It still doesn't work and if I take out the header page it just goes blank and says Done at the bottom in ie
- Wed Jun 04, 2008 11:59 am
- Forum: PHP - Code
- Topic: Update MySQL DB from a form
- Replies: 24
- Views: 1124
Re: Update MySQL DB from a form
Array ( [L_ID] => 32 [submit2] => Upload Level )
whatever that means lol
whatever that means lol
- Wed Jun 04, 2008 11:49 am
- Forum: PHP - Code
- Topic: Update MySQL DB from a form
- Replies: 24
- Views: 1124
Re: Update MySQL DB from a form
No error 
mysql_query("UPDATE login SET access = 2 WHERE firstName = " .$_POST['firstName']. "\"");
print_r($_POST);
header('Location: admin2.php');
mysql_query("UPDATE login SET access = 2 WHERE firstName = " .$_POST['firstName']. "\"");
print_r($_POST);
header('Location: admin2.php');
- Wed Jun 04, 2008 11:41 am
- Forum: PHP - Code
- Topic: Update MySQL DB from a form
- Replies: 24
- Views: 1124
Re: Update MySQL DB from a form
OK, I noticed once I paste the code in here that I hadn't added L_ID into the Select firstName from... code.
This then changed the 1 to a 2 but then when I selected another name, it didn't change it
This then changed the 1 to a 2 but then when I selected another name, it didn't change it
- Wed Jun 04, 2008 11:36 am
- Forum: PHP - Code
- Topic: Update MySQL DB from a form
- Replies: 24
- Views: 1124
Re: Update MySQL DB from a form
HTML Page but the <select> tag is populated by the DB. L_ID is the name of one of the rows in the DB admin2.php $sql = ("SELECT firstName FROM login order by firstName"); $result = mysql_query($sql, $link); ?> <form name="level" method="post" action="levelSQL.php&q...
- Wed Jun 04, 2008 11:28 am
- Forum: PHP - Code
- Topic: Update MySQL DB from a form
- Replies: 24
- Views: 1124
Re: Update MySQL DB from a form
doesn't do anything, just goes back to the page admin2.php
mysql_query("UPDATE login SET access = 2 WHERE firstName = " .$_POST['firstName']. "\"");
header('Location: admin2.php');
mysql_query("UPDATE login SET access = 2 WHERE firstName = " .$_POST['firstName']. "\"");
header('Location: admin2.php');
- Wed Jun 04, 2008 11:24 am
- Forum: PHP - Code
- Topic: Update MySQL DB from a form
- Replies: 24
- Views: 1124
Re: Update MySQL DB from a form
No sorry
The database doesn't change to a 2
The database doesn't change to a 2
- Wed Jun 04, 2008 11:01 am
- Forum: PHP - Code
- Topic: Update MySQL DB from a form
- Replies: 24
- Views: 1124
Re: Update MySQL DB from a form
Have also tried this but this doesn't work either.
mysql_query("UPDATE login SET access = 2 WHERE firstName = " .$_POST['firstName']. ";");
header('Location: admin2.php');
mysql_query("UPDATE login SET access = 2 WHERE firstName = " .$_POST['firstName']. ";");
header('Location: admin2.php');
- Wed Jun 04, 2008 10:24 am
- Forum: PHP - Code
- Topic: Update MySQL DB from a form
- Replies: 24
- Views: 1124
Update MySQL DB from a form
Hi guys, I am now trying to update a MySQL DB from a form. The L_ID is the name of the row in the DB and the name of the value from the <select> tag. Can you help? $myrow = ($_POST['L_ID']); mysql_query("UPDATE login SET level = '2' WHERE L_ID = ". $myrow["L_ID"] .";");
- Wed Jun 04, 2008 9:19 am
- Forum: PHP - Code
- Topic: Select Dropdown with info from DB
- Replies: 9
- Views: 714
Re: Select Dropdown with info from DB
Thanks guys, it now works.
I appreciate it
I appreciate it