Recent content by stevet70

  1. S

    Problem updating database through form

    I've a series of PHP pages on a website which allow you to either update your subscription details or unsubscribe. Firstly you enter your email address and, presuming you enter a valid one, your details are taken from the MySQL database table and listed followed by two buttons - one to update...
  2. S

    MySQL question

    thanks, that's perfect!
  3. S

    MySQL question

    Is it possible to insert a new field into a table (using either PHP or going through phpMyAdmin) that will automatically have a word in it for each record - without needing to edit each record as there's over 1500? Doesn't really matter what the word is, can be 'yes' for example, just needs...
  4. S

    batch emailing

    here's the main chunk of code to show where I'm up to, using PHPMailer (v5) to allow sending out html emails to a database held mailing list $result = @mysql_query($query); while (1==1) { set_time_limit(30); // sets (or resets) maximum execution time to 30 seconds) // .... put code...
  5. S

    MySQL SELECT Query question

    I managed to get the select statement with "MATCH (notes) AGAINST ('invite')" in to work, after adjusting the notes field to be FULLTEXT with a little playing in phpMyAdmin, even though there are several words in each column it picks up those that contain it without any problems. Will certainly...
  6. S

    MySQL SELECT Query question

    So far all the MySQL queries I've used that include WHERE have been nice and simple, such as: SELECT * FROM subs WHERE exhibitions='yes' But what happens if the field you're dealing with is populated by a series of keywords and you want to make a selection based on just one from that...
  7. S

    database driven html email problem

    Thanks, that was a huge help, showed I'd messed up with the wrong username - been flipping between the test and live sites where there's a couple of differences due to hosting set up big oops! Now I just have to work out the SMTP error messages, I'm guessing to do with authentication, so no...
  8. S

    database driven html email problem

    I need to be able to set up an email facility for a website that 1. has a small number of templates (eg. header, editable main text body and footer, the information for which will be in a MySQL database) 2. can be sent to multiple email addresses (addresses taken from the same database but...
  9. S

    PHPMailer / MySQL Array Problem

    Attempting to get an example file for PHPMailer 5 to work, one that pulls info from a database to send to multiple recipients. I've ammended the test file to include all my relevant settings (username, password, etc) but am getting the following error message: Warning: mysql_fetch_array()...
  10. S

    PHP problem - if / else

    thanks gomarc, works perfectly now
  11. S

    PHP problem - if / else

    currently the code in question looks like this: <tr> <td width="140" height="30" align="left" valign="top">Interests</td> <td width="320" height="30" align="left" valign="top"><input type="checkbox" name="exhibitions" value="yes" <?php if ($exhibitions == 'yes') ?>...
  12. S

    how to ignore empty results from MySQL query in PHP?

    thanks for that, I'd just tried a slightly fudged <div id="archive_text"> <?php $year = '2010'; $sql = 'SELECT * FROM exhibitions WHERE archive="yes" AND year="2010" ORDER BY year DESC, month DESC'; $result = mysql_query($sql) or die(mysql_error()); if(mysql_num_rows($result)>0){ echo...
  13. S

    how to ignore empty results from MySQL query in PHP?

    I'm planning to try a few approaches to pulling out information from a MySQL database using PHP that will break things down into groups according to year - it's for an art gallery archive. Each group of results will have the year displayed top left (only once), then on the right the list of...
  14. S

    Query String - $_GET problem

    thanks, perfect! obviously time I took a break
  15. S

    Query String - $_GET problem

    As part of a MySQL driven CMS I need to pass an id to a page which inserts new content into a database table The links on one page, dealt with using an array, include the query string after .php such as ?id=8 - all good. The form page needs to use this id in a hidden field: exhibition_id...
Top