Professional Web Applications Themes

Very Newbie Question - PHP Development

Hi I am trying to create a simple newsletter unsubscribe php page but am having problems. On PAGE1, the visitor types in their email address to be removed and clicks on a button that should then load up PAGE2; PAGE1 echo "<form action='page2.php' method='post'>"; /* EMAIL ADDRESS */ echo "To stop receiving FreeInUKs newsletter, please type in your email address:<br>"; echo "<input type='text' name='removeemailaddress'><br><br>\n"; echo "<input type='submit' value='Unsubscribe'></form>\n"; PAGE2 $query = "DELETE FROM signmeup WHERE $removeemailaddress=signmeupemail"; $result = mysql_query($query) or die ("Sorry your email address is not listed in our database.<br>"); echo "Your email address has now been removed.<br>"; The ...

  1. #1

    Default Very Newbie Question

    Hi

    I am trying to create a simple newsletter unsubscribe php page but am having
    problems. On PAGE1, the visitor types in their email address to be removed
    and clicks on a button that should then load up PAGE2;

    PAGE1
    echo "<form action='page2.php' method='post'>";
    /* EMAIL ADDRESS */
    echo "To stop receiving FreeInUKs newsletter, please type in your email
    address:<br>";
    echo "<input type='text' name='removeemailaddress'><br><br>\n";
    echo "<input type='submit' value='Unsubscribe'></form>\n";

    PAGE2
    $query = "DELETE FROM signmeup WHERE $removeemailaddress=signmeupemail";
    $result = mysql_query($query)
    or die ("Sorry your email address is not listed in our database.<br>");
    echo "Your email address has now been removed.<br>";

    The tablename signmeup is correct, as is the field signmeupemail, but for
    some reason I keep getting the 'Sorry your email address is not listed'
    error message, even though it is listed.

    I am new to this, so any direct help would be appreciated. I have searched
    and searched and now been working on it for the last 4 hours!!!!

    Thanks



    frostie Guest

  2. #2

    Default Re: Very Newbie Question

    >
    > I am trying to create a simple newsletter unsubscribe php page but am
    having
    > problems. On PAGE1, the visitor types in their email address to be removed
    > and clicks on a button that should then load up PAGE2;
    >
    > PAGE1
    > echo "<form action='page2.php' method='post'>";
    > /* EMAIL ADDRESS */
    > echo "To stop receiving FreeInUKs newsletter, please type in your email
    > address:<br>";
    > echo "<input type='text' name='removeemailaddress'><br><br>\n";
    > echo "<input type='submit' value='Unsubscribe'></form>\n";
    >
    > PAGE2
    > $query = "DELETE FROM signmeup WHERE $removeemailaddress=signmeupemail";
    > $result = mysql_query($query)
    > or die ("Sorry your email address is not listed in our database.<br>");
    > echo "Your email address has now been removed.<br>";
    >
    > The tablename signmeup is correct, as is the field signmeupemail, but for
    > some reason I keep getting the 'Sorry your email address is not listed'
    > error message, even though it is listed.
    >
    > I am new to this, so any direct help would be appreciated. I have searched
    > and searched and now been working on it for the last 4 hours!!!!







    Aghghhhhh its OK, I have now fixed it, there were ' ' missing :o)
    $query = "DELETE FROM signmeup WHERE $removeemailaddress=signmeupemail";
    SHOULD HAVE BEEN
    $query = "DELETE FROM signmeup WHERE '$removeemailaddress'=signmeupemail";

    :o)


    frostie Guest

  3. #3

    Default Re: Very Newbie Question


    "frostie" <frostiecukyourtop.yahoo.co.uk> schreef in bericht
    news:bit3uu$gfg$1titan.btinternet.com...
    > Hi
    ....
    >
    > PAGE2
    > $query = "DELETE FROM signmeup WHERE $removeemailaddress=signmeupemail";
    > $result = mysql_query($query)
    > or die ("Sorry your email address is not listed in our database.<br>");
    > echo "Your email address has now been removed.<br>";
    >
    > The tablename signmeup is correct, as is the field signmeupemail, but for
    > some reason I keep getting the 'Sorry your email address is not listed'
    > error message, even though it is listed.
    >
    The field name is signmeupemail and not held inside the $removeemailaddress
    variable, so your query should look like this:

    $query = "DELETE FROM signmeup WHERE signmeupemail = '$removeemailaddress'";

    PS: Take more care on how you call your variables. Writing
    'removeEmailaddress' is better readable and less typo prone than
    'removeemailadress'.


    JW



    Janwillem Borleffs Guest

  4. #4

    Default Very Newbie Question

    Hi All

    I have created some Text within firworks, but when I use the text within Dreamweaver the text background is does not appear as the page colour. I have tried all the canvas options within Fireworks but I am still stuck.

    Any help would be very much appretiated


    Thanks

    Clive


    clivejoy webforumsuser@macromedia.com Guest

  5. #5

    Default Re: Very Newbie Question

    Just add a background color to the table cell in Dreamweaver.


    Best regards,
    Linda Rathgeber
    ----------------
    Victoriana | [url]http://www.projectseven.com/dpacks/vic/index.htm[/url]
    Theme Pack 03 - Club | [url]www.projectseven.com[/url] |mm2| themes
    Contributor *PVII Foundations* [url]www.projectseven.com[/url]
    Co-author *Playing with Fire* [url]www.playingwithfire.com[/url]
    Team MM Fireworks Volunteer | [url]www.macromedia.com/go/team[/url]
    -----------------

    Linda Rathgeber Guest

  6. #6

    Default Re: Very Newbie Question

    "clivejoy" <webforumsusermacromedia.com> wrote in message
    news:bjqg4s$dfm$1forums.macromedia.com...
    > Hi All
    >
    > I have created some Text within firworks, but when I use the text within
    Dreamweaver the text background is does not appear as the page colour. I
    have tried all the canvas options within Fireworks but I am still stuck.

    If I understand your question correctly, the answer is TRANSPARENCY. Export
    the image as a gif and set the background as transparent and you should be
    OK.

    --
    Pooley


    David McManus Guest

Similar Threads

  1. Newbie Question: Biz Card Template Question
    By Thomas_Porter@adobeforums.com in forum Adobe Indesign Windows
    Replies: 4
    Last Post: May 30th, 08:08 AM
  2. A newbie with a newbie question
    By dusty_davis@adobeforums.com in forum Adobe Acrobat Macintosh
    Replies: 5
    Last Post: October 14th, 07:54 AM
  3. A newbie question on SSO
    By Holysmoke in forum ASP.NET Security
    Replies: 2
    Last Post: October 8th, 01:53 PM
  4. Pen Tool Use Question. (Embarrassingly Newbie Question)
    By Bozo Schmozo in forum Macromedia Flash
    Replies: 0
    Last Post: November 12th, 10:00 PM
  5. [newbie] dbi question
    By tsheets in forum PERL Miscellaneous
    Replies: 3
    Last Post: September 10th, 04:26 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139