peranha
Members-
Posts
878 -
Joined
-
Last visited
Everything posted by peranha
-
You are missing the ) after FALSE on the post.
-
I already have sessions set up to store on the server, I was woundering if there is a way to store them in a SQL database and check this on the pages.
-
I was woundering if there is a good tutorial on inserting session information into a database, and calling it for logging in, checking it for accessing pages, deleting it for logout, misc. Thanks for the help.
-
Do you have PHP installed and integrated with your web server?
-
[SOLVED] Query failed. You have an error in your SQL syntax.
peranha replied to Deanznet's topic in PHP Coding Help
which lines are 135 and 120. -
Dont know why your account was deleted, you didnt do anything to compromise the security of this site, all you did was post a MD5 hash, Who knows if they use MD5 here, or if they use something else to hash, or if they even do hash, maybee something they made themselves. Agree with you, this is uncalled for.
-
Yes I did this, and it now works. I did not test it in IE either as i do not use IE. Thanks for the help.
-
Yes I am using PHP to validate as well, but the javascript does not validate before, it just sends it, and the php will validate. Here is the php validate code that I have // open connection $connection = mysql_connect($server, $user, $pass) or die ("Unable to connect!"); // get form input // check to make sure it's all there // escape input values for greater safety $username = empty($_POST['username']) ? die ("Enter A User Name") : mysql_escape_string($_POST['username']); $password = empty($_POST['password']) ? die ("Enter A Password") : mysql_escape_string($_POST['password']); $firstname = empty($_POST['firstname']) ? die ("Enter name") : mysql_escape_string($_POST['firstname']); $lastname = empty($_POST['lastname']) ? die ("Enter name") : mysql_escape_string($_POST['lastname']); $address = empty($_POST['address']) ? die ("Enter Address 1") : mysql_escape_string($_POST['address']); $city = empty($_POST['city']) ? die ("Enter City") : mysql_escape_string($_POST['city']); $state = empty($_POST['state']) ? die ("Enter State Abbreviation") : mysql_escape_string($_POST['state']); $ZIP = empty($_POST['ZIP']) ? die ("Enter Zip Code") : mysql_escape_string($_POST['ZIP']); $Email = empty($_POST['Email']) ? die ("Enter Email") : mysql_escape_string($_POST['Email']); $phone = empty($_POST['phone']) ? die ("Enter Phone Number") : mysql_escape_string($_POST['phone']); I just want it to give the popup after submitted, not actually go to the page and give the php error. Is there anything that has to be put on this page for the js to run first? Thanks.
-
This is the functions.js page function checkForm() { var username = document.register.username; var password = document.register.password; var firstname = document.register.firstname; var lastname = document.register.lastname; var address = document.register.address; var city = document.register.city; var state = document.register.state; var ZIP = document.register.ZIP; var Email = document.register.Email; var phone = document.register.phone; //Check to make sure posted lengths are sensible if (username.value.length < 1) { alert("Enter a User Name."); return false; } else { if (password.value.length < 1) { alert("Enter a Password."); return false; } else { if (firstname.value.length < 1) { alert("Enter Your First Name."); return false; } else { if (lastname.value.length < 1) { alert("Enter Your First Name."); return false; } else { if (address.value.length < 1) { alert("Enter Your Address."); return false; } else { if (city.value.length < 1) { alert("Enter The City You Live In."); return false; } else { if (state.value.length < 1) { alert("Enter The State You Live In."); return false; } else { if (state.value.length > 2) { alert("Use The States 2 letter abbreviation."); return false; } else { if (ZIP.value.length < 1) { alert("Enter Your 5 Digit ZIP code."); return false; } else { if (Email.value.length < 1) { alert("Enter Your Email Address."); return false; } else { if (phone.value.length < 1) { alert("Enter Your Phone Number."); return false; } else { return true; } } } } } } } } } } } } Here is the register page. <html> <head> <title>Registration Page</title> <script src="includes/functions.js"></script> <basefont face="Arial"> </head> <BODY> <form action="register1.php" method="post" name="register" onsubmit="return checkForm(this)"> <TABLE id="register" cellpadding="1" border="1" bgcolor="lightblue"> <TR> <TD>Username:</TD><TD><input type="text" name="username"></TD> </TR> <TR> <TD>Password:</TD><TD><input type="password" name="password"></TD> </TR> <TR> <TD>First Name:</TD><TD><input type="text" name="firstname"></TD> </TR> <TR> <TD>Last Name:</TD><TD><input type="text" name="lastname"></TD> </TR> <TR> <TD>Address:</TD><TD><input type="text" name="address"></TD> </TR> <TR> <TD>City:</TD><TD><input type="text" name="city"></TD> </TR> <TR> <TD>State:</TD><TD><input type="text" name="state"></TD> </TR> <TR> <TD>ZIP Code:</TD><TD><input type="text" name="ZIP" value = "12345"></TD> </TR> <TR> <TD>Email:</TD><TD><input type="text" name="Email"></TD> </TR> <TR> <TD>Phone Number:</TD><TD><input type="text" name="phone"></TD> </TR> <TR> <TD><input type="submit" name="submit" value="Submit"></TD> </TR> </TABLE> </form> <H5> I wrote this to check and make sure items are filled in, but it does not work. it is supposed to check the register page, and give a popup if one of the items is not filled in. The register1.php page adds the data to the database. If anyone could help that would be great. I am new to JS, so this is new to me. Thanks in advance.
-
[SOLVED] Hyperlink in Table for editing information
peranha replied to peranha's topic in PHP Coding Help
Thanks for the help, Works Great. -
What I have is a table with 3 columns, and in the first column, I have it linked to editpost.php? with the id behind it. I need to somehow get that id into the editpost page to bring up the info in 3 text boxes for the user to edit. Not sure as to how to do this. Here is the table info that they will click on to edit items. <TR><TD WIDTH="225"><a href='editpost.php?<?PHP echo $row[0]; ?>'><?PHP echo $row[1]; ?></a></TD><TD WIDTH="460"><?PHP echo $row[2]; ?></TD><TD WIDTH="70" align="center"><?PHP echo $row[3]; ?></TD></TR> Here is the edit page // create query $query1 = "SELECT * FROM table WHERE commid = ?"; Not sure as to what to put in the commid = ?. If anyone can help, that would be great. Thanks in advance.
-
What function do i use for data encyrption and decryption ?
peranha replied to jd2007's topic in PHP Coding Help
md5 and sha1 are 1 way encryption, and cannot be decrypted. -
Here he put TechUsers as database name, just woundering if this is correct, or a mistake.
-
what is with the techhours in your example though
-
Include() not working cannot link to external files
peranha replied to celblock's topic in PHP Coding Help
<?PHP include ("include/config.php"); ?> This is what it should look like -
Yes the US changed it, there is a patch that you need to find and download. The patch can be downloaded here http://www.intelliadmin.com/blog/2007/01/unofficial-windows-2000-daylight.html.
-
Yes, used to do the same thing for cisco. Passed with no problem, but when it came to the cert test, bombed it. Probably shouldve listened a little more.
-
[SOLVED] A little problem, the code is not doing what it should!!!
peranha replied to npsari's topic in PHP Coding Help
no they dont have to be in the same folder. you can have the files in the main directory, and index.php in a sub folder. If this is how you have it set up, the code I give you will work. If you have to go back a directory, then you have to put in .. before the file path. -
[SOLVED] A little problem, the code is not doing what it should!!!
peranha replied to npsari's topic in PHP Coding Help
include ("details/index.php"); -
Replace field with the field name in your table.
-
In your Httpd.conf file change the line that says Listen 8080 to Listen 80 ServerName from :8080 to :80 and restart apache Server
-
This should get rid of the insert problem. $insert = INSERT INTO $table (field) values ('$email')"); $result = mysql_query($insert) or die ("Error in query: $insert. ".mysql_error());
-
Sorry, I created 2 pages out of it, but you can make 1 in needed. instead of useredit1.php, put in the name of your page.
-
First part of the code is useredit.php and the second part of the code is useredit1.php
-
How about you apache log file, is there any errors in it?