Jump to content

nphls

Members
  • Posts

    14
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

nphls's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Once again p2grace and seventheyejosh, thanks a lot. Sorry for bothering with such noob quesitons. I hope someday I too can help the newbies. Cheers
  2. ID FirstName LastName 01 John Doe1 Edit this record Delete this record 02 John Doe2 Edit this record Delete this record 03 John Doe3 Edit this record Delete this record I am now trying to add a "Delete this record" link. However, I don't think it would be a very good idea use a $_GET variable for this. But maybe I am wrong. How can I use a $_POST variable here? Or how can I do it differently? Thanks
  3. Thanks a lot seventheyejosh and p2grace. You really solved my problem and I learned about SQL injection (just googled it) and how to prevent it to some extent. Thanks.
  4. Hi everyone. So I have a table similiar to the one below. It is grabbing the data from a mySQL database. ID FirstName LastName 01 John Doe1 Edit this record 02 John Doe2 Edit this record 03 John Doe3 Edit this record When "Edit this record" is clicked, it should go to a different page (edit_record.php) where there is a form whose values would be from that specific record. The user would edit the info and then click a button to save the changes. What I don't know how to do, is how to pass the ID, for example, of the the record to edit to "edit_record.php". Cheers.
  5. Can anyone give me a hand? I'd really pareciate your help
  6. Hi. I'd like to know how can i set the SMTP server when sending mails through mail()function. Do you know how i can do that? If you do, plz let me no. I have the following code if it helps: [code]<?php $to = 'teste@test.com'; $from = $_POST['email']; $subject = $_POST['msg']; $confirm = 'confirm.php'; $error = 'mailerror.php'; // Don't touch anything else // $mailheader = "From: $from"; $mailheader .= "Reply-To: $from"; if (isset($HTTP_POST_VARS)){ $mailbody = ''; while (list($key, $value) = each($HTTP_POST_VARS)) { $mailbody .= $key . ' = ' . $value . "rn"; } } $mailforms = mail($to, $subject, $mailbody, $mailheader); if($mailforms) { include("$confirm"); } else { include("$error"); } ?> [/code]
  7. Btw do you also know how to access MySQL which comes with EasyPHP, too?
  8. Thnaks a lot for your help.
  9. [!--quoteo(post=379147:date=Jun 1 2006, 08:09 PM:name=poirot)--][div class=\'quotetop\']QUOTE(poirot @ Jun 1 2006, 08:09 PM) [snapback]379147[/snapback][/div][div class=\'quotemain\'][!--quotec--] I do not use EasyPHP, but it's probably an address you type in the add. bar With a quick glimpse of the FAQ, I think that could be: [a href=\"http://localhost/mysql\" target=\"_blank\"]http://localhost/mysql[/a] [/quote] It didn't work.
  10. The topic title says it all: How can access phpmyadmin? Do i have to write something on the browser? I have EasyPHP installed. [img src=\"style_emoticons/[#EMO_DIR#]/unsure.gif\" style=\"vertical-align:middle\" emoid=\":unsure:\" border=\"0\" alt=\"unsure.gif\" /]
  11. Thanks for your help. The error was in synthax. I had this: [code]$request = "INSERT INTO users values(NULL,'$user','$pass','$email','$name','$country','$city',)";[/code] I just removed the comma after $city. However, thanks a lot for your help, otherwise i would'nt have found that error. [img src=\"style_emoticons/[#EMO_DIR#]/wink.gif\" style=\"vertical-align:middle\" emoid=\":wink:\" border=\"0\" alt=\"wink.gif\" /]
  12. I have a problem with a "registration form". The problem is that i cant enter the data into the MySQL database. I enter the data in the form correctly and then it goes to "registered.php" where it sould introduce the data in the database. Here's the code. At the end of it there's an IF for me to know if the data was inserted or no in the database. I always get "Not registered". Where's the mistake? Can you help me, because i just don't know where it is. [code]<HTML> <HEAD> <TITLE>Registered.php</TITLE> </HEAD> <BODY> <? $user = $_POST['username']; $pass = $_POST['password']; $email = $_POST['email']; $name = $_POST['name']; $country = $_POST['country']; $city = $_POST['city']; //////////////////////////////////////////////////////////////////////////////// $host = 'localhost'; $username = 'root'; $database = 'project'; $password = ''; $connect = mysql_connect($host,$username,$password) or die("Error connecting to Database! " . mysql_error()); mysql_select_db($database , $connect) or die("Cannot select database! " . mysql_error()); $request = "INSERT INTO users values(NULL,'$user','$pass','$email','$name','$country','$city',)"; $results = mysql_query($request); if($results) { echo "Registered" } else { echo "Not Registered"; } mysql_close($connect); Die(); ?> </BODY> </HTML>[/code]
  13. Can anyone tell me what this mean and what does it do? [code]header('P3P: CP="NON ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"');[/code]
  14. I'd like to know if you could give me a help in headers. I don't know how to use them. My code is like this: [code]//PASSWORD VERIFICATION if (($pass)!=($pass2)) //if the values stored in the 2 variables are //different we redirect the users to a previously created error page {     header("Location: error-pwverify.php"); //the user will be sent to this page     Die(); }[/code] I wanted to display like an error message when the passwrods aren't the same. I hope you guys fan help me out of this. Thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.