Jump to content

jcstanley

Members
  • Posts

    74
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jcstanley's Achievements

Member

Member (2/5)

0

Reputation

  1. Hi shamuntoha No, the passwords are not encypted. Basically the problem is, when the form is submitted with the reset password checkbox checked (value = 1), the value is stored in the reset column of the table, but the password coulmn in the same table also needs to be updated to the word "password". Is this possible or is there a better way?
  2. Hi I am using dreamweaver CS3 to create my site. I have a form which enables an admin user to edit a member's details - one of the options being able to reset the password for that user back to the word "password". A check box which submits a value of 1 if it is ticked and stores it in the "reset" column of the database. When the user attempts to login a query checks the value in the "reset" column. If the value is 1 then the reset password page is displayed, if the value is 0 they login as normal. Anyway, the problem I have is how do I update the password field (to the word password) only if the reset password checkbox is ticked when the form is submitted? I have had a play around with Custom Transactions/Triggers but can't figure it out. Basically I think i need an IF statement to execute when the form is submitted. Any ideas how this can be done? Hope this makes sense! Thanks in advance
  3. Hi I am using dreamweaver CS3 to create my site. I have a form which enables an admin user to edit a member's details - one of the options being able to reset the password for that user back to the word "password". A check box which submits a value of 1 if it is ticked and stores it in the "reset" column of the database. When the user attempts to login a query checks the value in the "reset" column. If the value is 1 then the reset password page is displayed, if the value is 0 they login as normal. Anyway, the problem I have is how do I update the password field (to the word password) only if the checkbox is ticked when the form is submitted? I have had a play around with Custom Transactions but can't figure it out. Basically I think i need an IF statement to execute when the form is submitted. Any ideas how this can be done? Hope this makes sense! Thanks in advance
  4. Thanks that worked, but now i have added 2 more office columns to the members table so it now looks like: Table: members memid (Primary Key), fname, surname, email, office1, office2, office3 each of member can belong in upto 3 offices hence office1, 2 and 3. what do i need to change in the code to make it work: SELECT m.memid, m.surname, m.fname, m.email, o.abbreviation FROM members AS m INNER JOIN offices AS o ON ( o.officeid = m.office ) Thanks
  5. Hi I have two tables with the following fields: Table 1: offices officeid (Primary Key), name, abbreviation Table 2: members memid (Primary Key), fname, surname, email, office A form is used to insert a new member into the members table - the value stored in the 'office' field is the officeid which is selected from a dynamic menu which displays lists all of the rows in the offices table. This works fine and is not a problem. I have a page which queries the members table for all rows and columns and displays the results in a table on the page. SELECT memid, surname, fname, email, office FROM members The part where I have got stuck is converting the value stored in the 'office' field in the members table to show associated value stored in the 'abbreviation' field in the offices table. Basically I want the user to see some text (the abbreviation field) rather than a meaningless number (officeid). I would be grateful if you could point me in the right direction. Hope this makes sense! If you need more info please let me know. Thanks in advance
  6. Thanks I will give it a try!
  7. thanks for the suggestion. do you have an example you could show me as i am not too familiar with javascript?
  8. Hi I am trying to create a CMS. When inputting text into a text box how can I give the user the option make a hyperlink? I guess when the form is submitted the data should be stored as text in the database but it will have the <a href....etc> tags around it. Then the other question is how do you read it back to be displayed as a clickable hyperlink on the page. I know that paragraphs are formatted using nl2br. Is there something similar for hyperlinks? Thanks in advance
  9. ok im nearly there now. I have the following code which loops through and retrieves the values of the CheckboxMail Array. $toCheck = $_POST['CheckboxMail']; $count = count( $toCheck ); for( $i = 0; $i < $count; $i++ ) { $value= ($_POST['CheckboxMail'][$i]); $list=$list." ". $value; echo $list; } The problem now is to with looping. Say i selected 3 rows, when $list is output to the screen i end up with: john@smith.com john@smith.com example@example.com john@smith.com example@example.com 123@xyz.com what I need is: john@smith.com example@example.com 123@xyz.com Where am i going wrong?
  10. I have managed to get the values of the array and display them on screen! foreach($_POST['CheckboxMail'] as $key=>$value) { $string=("$value"); echo $string; } But i need to create a string in the format: user@example.com, 123@xyz.com,...etc and am not sure how to do it. Any ideas? Thanks
  11. I know it is to do with arrays. i renamed the check boxes CheckboxMail[] and the the $_POST['CheckboxMail']. but how can i create a string to use with the mail() eg john@smith.com, x@y.com,..... just not sure how to loop throught the array. any suggestion? thanks
  12. Hi I currently have a table that shows the details of every member in the database. What i am trying to achive is a way of providing the user with a method of selecting individual users ie.checkbox (and a select all function) to send a bulk email to. I am familiar with the php mail fuinction but am not sure how to go about this so any ideas/examples would be great. Here is the code for what i have got so far: mysql_select_db($database_psc, $psc); $query_rsAllMembers = "SELECT * FROM members ORDER BY surname ASC"; $rsAllMembers = mysql_query($query_rsAllMembers, $psc) or die(mysql_error()); $row_rsAllMembers = mysql_fetch_assoc($rsAllMembers); $totalRows_rsAllMembers = mysql_num_rows($rsAllMembers); form id="allmembers" name="allmembers" method="post" action=""> <table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td class="tablecontent"><div align="center"><strong>Forename</strong></div></td> <td class="tablecontent"><div align="center"><strong>Surname</strong></div></td> <td class="tablecontent"><div align="center"><strong>Telephone</strong></div></td> <td class="tablecontent"><div align="center"><strong>Email</strong></div></td> <td class="tablecontent"><div align="center"><strong>Last Logged in</strong></div></td> <td class="tablecontent"><div align="center"><strong>Mail</strong></div></td> </tr> <?php do { ?> <tr> <td height="44" class="tablecontent"><?php echo $row_rsAllMembers['fname']; ?></td> <td class="tablecontent"><?php echo $row_rsAllMembers['surname']; ?></td> <td class="tablecontent"><?php echo $row_rsAllMembers['telephone']; ?></td> <td class="tablecontent"><?php echo $row_rsAllMembers['email']; ?></td> <td class="tablecontent"><?php echo $row_rsAllMembers['login']; ?></td> <td class="tablecontent"> <label> <input name="CheckboxMail" type="checkbox" id="CheckboxMail" value="<?php echo $rsAllMembers['email'];?>" /> </label> </td> </tr> <?php } while ($row_rsAllMembers = mysql_fetch_assoc($rsAllMembers)); ?> </table> If you need more info please let me know Thanks
  13. Thank you very much haku!!!!!!! That is great - works perfectly
  14. nice idea but it gives an error: 'document.jumpForm.jumpMenu' is null or not an object. here is the link http://www.cashregisters-cornwall.com/jumpmenu/jumpmenu.php it opens a new window but uses the option name, not the value.
  15. Can anyone suggest another way or better way this can be done? looks like we are stumped!
×
×
  • 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.