Jump to content

peranha

Members
  • Posts

    878
  • Joined

  • Last visited

Everything posted by peranha

  1. use \r\n will cause a line break. <?php // Send the email. $subject = "Welcome"; $headers = 'Activation'; $message = "Thank you for registering. To activate your account, please click on this link:"; $message = $message. "www.domain.com/activate.php?x=" .mysql_insert_id(). "&y=$EmailCode"; $message = $message. ". \r\nYour username is $Username \r\n Your password is $Password2 !"; mail($Email, $subject, $message, $headers); ?>
  2. Supposed to be Show - Like I say, I dont know what this does show.show, who not just show? This should be echo "<option value=\"{$show['Show']}\">{$show['ID']} {$show['Show']} {$show['StartTime']}</option>"; Show.Show is the database.table, this is not needed. you just need the field name. The drop down is displaying correctly, it is not getting the value due to the $show['show'] not being $show['Show'] as the database field is.
  3. You only need to put in the field, not the database. Show.Show is the datase.table delete the first show so it is Also deleted the first ; it is not needed. "DELETE FROM `schedule` WHERE `Show`.`Show` ='{$_POST["toDelete"]}'";
  4. Is the field show supposed to be Show, or show in the following line? echo "<option value=\"{$show['show']}\">{$show['ID']} {$show['Show']} {$show['StartTime']}</option>";
  5. Yes that is correct, I have it going to test.php, you will have to change it to whatever page you want it to go to. EDIT You will not use post, you will use $_GET Links will look like this<a href=test.php?id=<?php echo $show['show']; ?> and on the next page, you will do $show = $_GET['id']; and do you sql queries from there.
  6. INSERT INTO user (lastip) VALUES ('$_SERVER['REMOTE_ADDR']')
  7. How can I show some code, from which pages? I don't know That is why you would get a quicker answer from the creator, it could be on any page that something is set. If you were supposed to pay for it, then we have no idea as to what page to look at.
  8. <?php $query = "SELECT * FROM table "; $result = mysql_query($query) or die ("<b class='red'>There is nothing on record</b>".mysql_error()); //... process contents of $result ... // see if any rows were returned if (mysql_num_rows($result) > 0) { // yes // print them one after another echo "<table cellpadding=1 border=1 bgcolor='lightblue'>"; ?> <TR> <TH>header1</TH> <TH>header2</TH> </TR> <?php while($row = mysql_fetch_row($result)) { ?> <TR> <TD WIDTH="90"><a href=test.php><?php echo $row[0]; ?></a></TD> <TD WIDTH="90"><a href=test.php><?php echo $row[1]; ?></a></TD> </TR> <?php } ?> <?php } echo "</table>"; } ?> This will get a table and link what it outputs to test.php
  9. I dont think that you can put a table inside of a drop down.
  10. to this line, just add the genre field echo "<option value=\"{$show['show']}\">{$show['show']}</option>"; echo "<option value=\"{$show['show']}\">{$show['show']} {$show['genre']}</option>"; That will put the genre in the dropdown menu. if that is what you are talking about.
  11. we will need to see some code, but you will probably get a quicker answer from the creator, if you downloaded it from them.
  12. you would just navigate to the pc by ip address, or by computer name if you want the output. EX. http://192.168.1.1/mec/index.php OR http://pcA/mec/index.php if you need to edit the files, as said, ftp, or if you are on windows, remote access will work.
  13. just put this code on one page and see if it shows the image <img src="logo.gif" width="672" height="153" /> If you are using apache, check you apache error log and see what it tells you there, maybee it cant find the file for some reason, it isnt readable due to a htaccess file.
  14. Is logo.gif in the same folder as these files, or is it in another folder?
  15. Here is the code that will work to make sure every field is filled in. <?php error_reporting(E_ALL); $connection=mysql_connect("localhost","root","simles"); $db=mysql_select_db("coproj",$connection); $result = mysql_query("select Email from Accounts where AccountID='$_POST[username]'") or die(mysql_error()); if(!$result) { echo "AccountID does not exist."; echo '<a href="email.php">Return to password page</a>'; } $row = mysql_fetch_row($result); $accemail = $row[0]; echo "b" . $accemail; echo "c" . $_POST['oldemail']; if (trim($_POST['username']) == '') { die('You did not fill the Account ID field <a href="email.php">Return to change password page</a>'); } if (trim($_POST['identification']) == '') { die('You did not fill the Identification No field <a href="email.php">Return to change password page</a>'); } if (trim($_POST['answer']) == '') { die('You did not fill the Answer field&#160; <a href="email.php">Return to change password page</a>'); } if (trim($_POST['question']) == '') { die('You did not fill the Secret Question field <a href="email.php">Return to change password page</a>'); } if (trim($_POST['oldemail']) == '') { die('You did not fill the Old Email field <a href="email.php">Return to change password page</a>'); } if (trim($_POST['newemail']) == '') { die('You did not fill the New Email field <a href="email.php">Return to change password page</a>'); } if (trim($_POST['newemail2']) == '') { die('You did not fill the Re-type New Email field <a href="email.php">Return to change password page</a>'); } else if ($_POST['oldemail'] != $accemail) { echo "email invalid."; echo '<a href="email.php">Return to email page</a>'; die(); } else if($_POST['newemail'] != $_POST['newemail2']) { echo "Your emails don't match."; echo '<a href="email.php">Return to change password page</a>'; die(); } $sql=mysql_query("UPDATE Accounts SET email='$_POST[newemail]' where Identification='$_POST[identification]' AND Answer='$_POST[answer]' AND SecretQuestion='$_POST[question]' AND username='$_POST[username]'") or die(mysql_error()); if($sql) { echo "You have successfully changed your email."; echo '<a href="index.php">Return to main page</a>'; } ?>
  16. Yeah, mark the topic as solved if it is finished.
  17. yeah, you have to delete the 2 echo statements out of the script I gave you.
  18. $sql=mysql_query("UPDATE Accounts SET email='$_POST[newemail]' where Identification='$_POST[identification]' AND Answer='$_POST[answer]' AND SecretQuestion='$_POST[question]' AND username='$_POST[username]'") or die(mysql_error()); this where you error is coming from. You dont have a column username in you database.
  19. that page is fine, this is what I have for the 2nd page, and it works fine on my server <?php error_reporting(E_ALL); $connection=mysql_connect("localhost","root","simles"); $db=mysql_select_db("coproj",$connection); $result = mysql_query("select Email from Accounts where AccountID='$_POST[username]'") or die(mysql_error()); if(!$result) { echo "AccountID does not exist."; echo '<a href="email.php">Return to password page</a>'; } $row = mysql_fetch_row($result); $accemail = $row[0]; echo "b" . $accemail; echo "c" . $_POST['oldemail']; if (!isset($_POST['username'])) { die('You did not fill the Account ID field <a href="email.php">Return to change password page</a>'); } if (!isset($_POST['identification'])) { die('You did not fill the Identification No field <a href="email.php">Return to change password page</a>'); } if (!isset($_POST['answer'])) { die('You did not fill the Answer field <a href="email.php">Return to change password page</a>'); } if (!isset($_POST['question'])) { die('You did not fill the Secret Question field <a href="email.php">Return to change password page</a>'); } if (!isset($_POST['oldemail'])) { die('You did not fill the Old Email field <a href="email.php">Return to change password page</a>'); } if (!isset($_POST['newemail'])) { die('You did not fill the New Email field <a href="email.php">Return to change password page</a>'); } if (!isset($_POST['newemail2'])) { die('You did not fill the Re-type New Email field <a href="email.php">Return to change password page</a>'); } if ($_POST['oldemail'] != $accemail) { echo "email invalid."; echo '<a href="email.php">Return to email page</a>'; die(); } if($_POST['newemail'] != $_POST['newemail2']) { echo "Your emails don't match."; echo '<a href="email.php">Return to change password page</a>'; die(); } $sql=mysql_query("UPDATE Accounts SET email='$_POST[newemail]' where Identification='$_POST[identification]' AND Answer='$_POST[answer]' AND SecretQuestion='$_POST[question]' AND username='$_POST[username]'") or die(mysql_error()); if($sql) { echo "You have successfully changed your email."; echo '<a href="index.php">Return to main page</a>'; } ?> you can delete the 2 echo lines once you are done with it, I just used them for testing, and it worked.
  20. show the code for the page where you are submitting the data from. You should be getting it at least once with echo $_POST['oldemail'];
  21. you should be getting more that just the error, are you getting the email twice, once, or not at all??
  22. I added it to the one that I gave to you.
  23. I updated the code above try it again.
  24. Try this and see what you get I found another thing that i missed. you are not actually fetching the info from the database. <?php error_reporting(E_ALL); $connection=mysql_connect("localhost","root","simles"); $db=mysql_select_db("coproj",$connection); $result = mysql_query("select Email from Accounts where AccountID='$_POST[username]'") or die(mysql_error()); if(!$result) { echo "AccountID does not exist."; echo '<a href="email.php">Return to password page</a>'; } $accemail = mysql_fetch_row($result); else if (!isset($_POST['username'])) { die('You did not fill the Account ID field <a href="email.php">Return to change password page</a>'); } else if (!isset($_POST['identification'])) { die('You did not fill the Identification No field <a href="email.php">Return to change password page</a>'); } else if (!isset($_POST['answer'])) { die('You did not fill the Answer field <a href="email.php">Return to change password page</a>'); } else if (!isset($_POST['question'])) { die('You did not fill the Secret Question field <a href="email.php">Return to change password page</a>'); } else if (!isset($_POST['oldemail'])) { die('You did not fill the Old Email field <a href="email.php">Return to change password page</a>'); } else if (!isset($_POST['newemail'])) { die('You did not fill the New Email field <a href="email.php">Return to change password page</a>'); } else if (!isset($_POST['newemail2'])) { die('You did not fill the Re-type New Email field <a href="email.php">Return to change password page</a>'); } else if ($_POST['oldemail'] != $accemail) { echo "email invalid."; echo '<a href="email.php">Return to email page</a>'; } else if($_POST['newemail'] != $_POST['newemail2']) { echo "Your emails don't match."; echo '<a href="email.php">Return to change password page</a>'; } else $sql=mysql_query("UPDATE Accounts SET email='$_POST[newemail]' where Identification='$_POST[identification]' AND Answer='$_POST[answer]' AND SecretQuestion='$_POST[question]' AND username='$_POST[username]'") or die(mysql_error()); if($sql) { echo "You have successfully changed your email."; echo '<a href="index.php">Return to main page</a>'; } ?>
×
×
  • 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.