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...
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...
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...
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...
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...
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...
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...
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()...
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...
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...
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...