Search found 11 matches

by Mh_0
Fri Feb 14, 2003 5:27 am
Forum: PHP coding => General
Topic: Automatic Redirection from Drop down box
Replies: 2
Views: 904

Automatic Redirection from Drop down box

When an item is seleted in a drop down box, I need the page to call itself, and using my current code it doesn't, what have I done wrong? <form NAME="resnav" ACTION="bevel2.php" METHOD="post" style="margin-bottom:0;"> <td> <select name="select" onChange="<? PHP_SELF; ?>"> <option value="" SELECTED>U...
by Mh_0
Fri Jan 24, 2003 1:11 am
Forum: PHP coding => General
Topic: checkboxes and writing to mysql
Replies: 1
Views: 857

checkboxes and writing to mysql

here are some snippets from my code (which are the bits that deal with the problem) at the moment the values of the checkboxes won't change when I try to write them to the database, has anyone got any ideas please? Thanks in advance (ps, the bits of code are in order, I am using forms to reset the p...
by Mh_0
Tue Jan 21, 2003 3:51 am
Forum: PHP coding => General
Topic: whats wrong with this?
Replies: 1
Views: 774

whats wrong with this?

$sql = "DELETE FROM `sme` WHERE (`PI`='' && `Details`='' && `location`='')"; mysql_query($sql)or die("<b>Query Failed</b><br>\n".$sql."<br>\n".mysql_errno().": ".mysql_error()); } the error message is: Query Failed DELETE FROM `sme` WHERE 1064: You have an error in your SQL syntax ne...
by Mh_0
Mon Jan 20, 2003 7:47 am
Forum: PHP coding => General
Topic: Protecting files with php
Replies: 10
Views: 2970

How about authentication, give people usernames and authenticate them against the contents of the database?

I found this site useful, it told me how to encrypt peoples passwords, and then how to autenticate them before loading a page

its what I did for my site!
by Mh_0
Mon Jan 20, 2003 7:07 am
Forum: PHP coding => General
Topic: I can't for the life of me see whats wrong with this
Replies: 3
Views: 1473

I can't for the life of me see whats wrong with this

heres the code if ($saveuser) { include('ukors_adminconnect.php'); $sql = "UPDATE Passwords SET `username`='$username'"; $result = mysql_query($sql); $result = mysql_query("SELECT * FROM Passwords ORDER by username ASC" ,$db); while ($myrow = mysql_fetch_array($result)) { if ($myrow[username] == $us...
by Mh_0
Wed Nov 20, 2002 6:45 am
Forum: mySQL & php coding
Topic: Wondering if anyone can help
Replies: 4
Views: 1885

Sorted.
by Mh_0
Wed Nov 20, 2002 3:08 am
Forum: mySQL & php coding
Topic: Wondering if anyone can help
Replies: 4
Views: 1885

it will be easiest if I show you the code to make the variables ok? mysql_connect("localhost", "root", "homer"); mysql_select_db("Cruises",$db); $sql = ("SELECT * FROM reports WHERE `reports`.'Criusenum' = '$cruisepage'"); $result = mysql_query($sql) or die("<b>Query Failed</b><br>\n".$sql."<br>\n"....
by Mh_0
Wed Nov 20, 2002 1:30 am
Forum: mySQL & php coding
Topic: Wondering if anyone can help
Replies: 4
Views: 1885

Wondering if anyone can help

I have a lot of variables with the names in a format such as $name1, $name2, $name3 etc, and there can be differing amounts of these. I need to be able to read them in to seperate records within a table in my database and I was wondering if there is any useful code for doing it? If there is can some...
by Mh_0
Wed Nov 20, 2002 1:27 am
Forum: mySQL & php coding
Topic: I can't get any manuipulation of my mysql database online
Replies: 5
Views: 2152

Its sorted, it was sorted by putting `s around the field names and 's around the variables
by Mh_0
Fri Nov 15, 2002 12:51 am
Forum: mySQL & php coding
Topic: I can't get any manuipulation of my mysql database online
Replies: 5
Views: 2152

Ummmm I can't use phpmyadmin in its release format, I need to do it in the webpage because there are lots of tables that need to be altered at once, and the users need to be able to modify data rather than the webmaster
by Mh_0
Thu Nov 14, 2002 7:34 am
Forum: mySQL & php coding
Topic: I can't get any manuipulation of my mysql database online
Replies: 5
Views: 2152

I can't get any manuipulation of my mysql database online

I hope someone out there can help me (being a newbie) I am writing what is probably quite a simple website using mainly php, I have sorted being able to read all the information from the various databases, but I can't seem to get any form of manipulation to work, below is a cut down version my manip...