Jump to content

webref.eu

Members
  • Posts

    210
  • Joined

  • Last visited

Everything posted by webref.eu

  1. Hi All I have read it's better to use sha1 now rather than md5 to encrypt passwords, i.e. $Password = sha1($Password); If I have a site running using the above technique, would it I encounter problems in terms of password recognition if I then had to move the site to another Linux server? i.e. can the unique items on the Linux server used to achieve the sha1 encryption be moved easily to a new Linux server? Any background info in what files are involved in creating sha1 encrypted passwords welcome too. Thanks all.
  2. Thanks for your help everybody, just using: <input type="checkbox" name="SubscribeToNewsletter" value="1" /> and later ... $SubscribeToNewsletter = $_POST['SubscribeToNewsletter']; is giving me the 0 value when not checked and the 1 when checked as I wanted. Thanks again.
  3. Hi All I am creating a registration form that has a "Subscribe to Newsletter" checkbox on it. If ticked, I want to record a value of 1 in my database, otherwise a value of 0. This is the html in my form: <input type="checkbox" name="SubscribeToNewsletter" /> Please could someone give me the code to get the desired values into the database. Many thanks
  4. Thank you for that, I am looking at that now. Does anyone have any further tutorials on paging so I can make sure I follow best practice. Many thanks all.
  5. Hi All Can someone point me in the direction of a good tutorial on paging records from a MySQL database. (I've looked at the tutorial section here but it's currently undergoing maintenance ...) Many thanks.
  6. Thanks guys.  Do I write the function in it's own .php file?  If so, what is the syntax to include the function in the page?  What is the syntax to call a function and send it a specific value of a variable at the same time?  Many thanks
  7. Hi All I have the following include file: <?php include("inc-select-merchants-by-keyphrase.php"); ?> Currently, I set a $KeyphraseAds variable for it at the top of my php page, to get merchants for the relevant keyphrase, and it displays a table of merchant results. However, this only allows one table of results on a page, and I would sometimes like to display multiple tables of results, i.e. use the include file more than once, but set a different $KeyphraseAds each time. Is there a way of setting an include specific variable, maybe within the include statement itself, to allow me to use the same include multiple times on a page but each time displaying different keyphrase results? I guess what I'm asking is, is there a way to send a variable to a specific instance of a php include? Many thanks
  8. Hi All If I have an SQL query which yields no results, what is the syntax for testing there are no results in an If statement?  FYI my code uses the following:  //assign query results to a result variable $result = mysql_query($query); if(!$result) die("Query Failed."); //associative array allows you to use field names to get results while($row = mysql_fetch_array($result, MYSQL_ASSOC) Many thanks WebRef.eu
×
×
  • 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.