-
Existing Customers Websites - In need of an Update
Hi Guys, I hope you can help, I've acquired few customers websites which, to be blunt, need bringing into the 21st Century. I'm looking to get some advice on how to approach them to say that essentially 'your website is crap and i'll build a new one for you, and by the way we will charge for it' any suggestions? Cheers Shane
-
What am i doing wrong?
could it be that the mysql server is on a windows host and the page is on a linux host?
-
What am i doing wrong?
yeah
-
What am i doing wrong?
that doesn't work, it says cannot connect to database ??any ideas?
-
What am i doing wrong?
I have tried this code, it send back the following error "Parse error: syntax error, unexpected '}' in /.../add_user.php on line 29" please see below my revised code, only has a couple of tweeks <?php if (isset($_POST['submit'])){ $connection = mysql_connect("***","****","***"); // Mysql Connection if (!$connection) { die('Could not connect: ' . mysql_error()); } mysql_select_db("***", $connection); $username = $_POST[username]; $password = $_POST[password]; $fullname = $_POST[fullname]; $hashed_password = sha1($password); $sql="INSERT INTO users (id username, hashed_password, full_name) VALUES ( NULL, '$username','$hashed_password', '$fullname')"; if (!mysql_query($sql,$connection)) { die('Error: ' . mysql_error()); } echo "1 record added"; mysql_close($connection) } //this is line 29 ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Add New User</title> </head> <body> <form action="add_user.php" method="post"> Username: <input type="text" name="username" /><br /> Password: <input type="password" name="password" /><br /> Fullname: <input type="text" name="fullname" /><br /> <input type="submit" name="submit" /> </form> </body> </html>
-
What am i doing wrong?
Hi Guys, My inital question was answered and i've been able to load the page. I have asked a second question which was how to i prevent the query from submitting when the page loads. i hope this clears up any confusion Kind Regards Shane
-
What am i doing wrong?
ok, it looks like its my host however, i have uploaded to another server, each time the page loads it adds a record to the table? any idea why? and how to stop it?
-
What am i doing wrong?
Have done this, still getting error
-
What am i doing wrong?
Have changed the code, still cant view the page, still getting the 500 error, its very strange, i can manually enter the values in the above code and it works fine, but as soon as i change the code to pick up information from the form it doesnt work. an ideas? P.s The ID is autoincrement so i can use NULL
-
What am i doing wrong?
i'm getting an internal server error 500 - Internal server error. i cannot even load the page any ideas?
-
What am i doing wrong?
Hi Guys, I'm trying to create a page where i can add new users to a database my code is <?php $connection = mysql_connect("***","***","***"); // Mysql Connection if (!$connection) { die('Could not connect: ' . mysql_error()); } mysql_select_db("***", $connection); $sql="INSERT INTO 'users' (id, username, hashed_password, full_name) VALUES ( NULL, '$_POST[username]','$_POST[hashed_password]', '$_POST[fullname]')"; if (!mysql_query($sql,$connection)) { die('Error: ' . mysql_error()); } echo "1 record added"; mysql_close($connection) ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Add New User</title> </head> <body> <form action="add_user.php" method="post"> Username: <input type="text" name="username" /><br /> Password: <input type="password" name="hashed_password" /><br /> Fullname: <input type="text" name="fullname" /><br /> <input type="submit" /> </form> </body> </html> I have ***'s out my login details and database name, but can anyone see why i get an error when i load the page I look forward to hearing your response Kind Regards Shane
-
-
Hello and a little help.
first of all, how come you are using a table layout? in answer to our question, you will need to have a div which all of your content will go into, and set a css property of #wrapper { margin: 0px auto; } (wrapper is the name i use)
-
CSS Validation Issue
the report is showing that you have set css for .wp-caption , i cannot find a reference to this class in your code, i think thats what the error maybe
-
PHP Development Software
Hi Guys, I know there are a already a number of posts about this topic but i'm kinda looking for something specific. I've been using MS Visual Web Developer Express to do work with ASP.NET, which i've found brilliant. I am, however looking for something similar for PHP. Any Ideas?
-
Photoshop Selection Tool
Hi, Its quite simple, you simply set the rectangle as the active layer and then use the rectangular selection tool to select the top and hit the delete key, then do the same for the bottom. i hope this helps Shane