Jump to content

Roberto

Members
  • Posts

    16
  • Joined

  • Last visited

    Never

Posts posted by Roberto

  1. [!--quoteo(post=367789:date=Apr 23 2006, 10:50 PM:name=Boerboel649)--][div class=\'quotetop\']QUOTE(Boerboel649 @ Apr 23 2006, 10:50 PM) [snapback]367789[/snapback][/div][div class=\'quotemain\'][!--quotec--]
    Oh well, forget the getting the page title thing.....
    OK, I'm almost done with this thing. However, I'm running into a problem with the section of code from the php page which sends the email after the form is submitted.

    [code]if (!$_POST['optionalmessage'])
    $optionalmessage = "No personal message";
    } else {
    $optionalmessage = " A personal message from your friend: /n $_POST['optionalmessage']";[/code]

    [/quote]

    You are missing { and }
    ie


    [code]if (!$_POST['optionalmessage'])
    {
    $optionalmessage = "No personal message";
    } else {
    $optionalmessage = " A personal message from your friend: /n $_POST['optionalmessage']";
    }
    [/code]
  2. [!--quoteo(post=367403:date=Apr 22 2006, 03:14 AM:name=businessman332211)--][div class=\'quotetop\']QUOTE(businessman332211 @ Apr 22 2006, 03:14 AM) [snapback]367403[/snapback][/div][div class=\'quotemain\'][!--quotec--]
    I honestly don't know if this is possible, I wanted to respond because no one had gotten around to answering you but as far as I know, no there isn't a way to do this, but I could be wrong.
    [/quote]
    Well, it's almost certainly possible. PHP has a command called system() which will run a program on the originating OS, so if your webserver is Linux, it lets you run a linux shell command. So, you need to find out how to create subdomains on your server.

    Rob
  3. [!--quoteo(post=366526:date=Apr 19 2006, 07:06 PM:name=poirot)--][div class=\'quotetop\']QUOTE(poirot @ Apr 19 2006, 07:06 PM) [snapback]366526[/snapback][/div][div class=\'quotemain\'][!--quotec--]
    And basically I want an alternative if the server doesn't have a SQL server.
    [/quote]
    Do you know about sqlLite? It provides an SQL database from php without the server needing any database installed. The info is here:

    [a href=\"http://uk2.php.net/manual/en/ref.sqlite.php\" target=\"_blank\"]http://uk2.php.net/manual/en/ref.sqlite.php[/a]

    Rob
  4. [!--quoteo(post=366776:date=Apr 20 2006, 12:33 PM:name=shocker-z)--][div class=\'quotetop\']QUOTE(shocker-z @ Apr 20 2006, 12:33 PM) [snapback]366776[/snapback][/div][div class=\'quotemain\'][!--quotec--]
    How can i output only the first 24 charactors of a line?
    [/quote]
    [code]echo substr ($your_string, 0 , 24)[/code]

    Rob
  5. [!--quoteo(post=366759:date=Apr 20 2006, 11:43 AM:name=Tux User)--][div class=\'quotetop\']QUOTE(Tux User @ Apr 20 2006, 11:43 AM) [snapback]366759[/snapback][/div][div class=\'quotemain\'][!--quotec--]
    By formatting i mean "Justifying a mail"

    e.g
    name city Number
    xxxxxx xxx xxxxxx
    xxxxxx xxx xxxxxx
    xxxxxx xxx xxxxxx
    xxxxxx xxx xxxxxx
    xxxxxx xxx xxxxxx
    xxxxxx xxx xxxxxx
    This is what i mean by indentation.

    Any solutions??
    [/quote]

    I think by definition it is not possible. If you are sending plain text, you have no control over what font the end user will use. You could format your table using spaces so that it would look right if viewed using a proportional font (eg courier) but it wouldn't look right if the user used a non-proportional font. (With non-proportional fonts, the charachters have different widths depending on what it is, so l is narrow and M is wide, but the widths differ with different fonts.)

    Rob
  6. Ha! So you won't use mySQL because it has this problem, but you find you can't solve it yourself. Do you really think you can make a FF database yourself which is going to perform better than mySQL which has lots of developers and has been going for years?

    Have you tried Postgress SQL database? It's supposed to be better than mySQL, and is also Open Source - [a href=\"http://www.postgresql.org/\" target=\"_blank\"]http://www.postgresql.org/[/a] (although I've never used it myself, mySQL has always been good enough.)

    Rob
  7. [!--quoteo(post=366459:date=Apr 19 2006, 04:30 PM:name=sharkyJay)--][div class=\'quotetop\']QUOTE(sharkyJay @ Apr 19 2006, 04:30 PM) [snapback]366459[/snapback][/div][div class=\'quotemain\'][!--quotec--]
    Is it possible to log into a database all the bounce e-mails. And pass variables from the bounce e-mail as well? I.e. for each e-mail there's an ID. When it bounces, it logs the e-mail address as well as the ID into a database.
    [/quote]
    Yes, it's possible, but I wouldn't have thought it would be easy. phpList is open source sotware which has this capability so you could look at the code to see how it is done, I guess it depends on how good at PHP you are!

    [a href=\"http://tincan.co.uk/phplist\" target=\"_blank\"]http://tincan.co.uk/phplist[/a]

    Rob
  8. [!--quoteo(post=366391:date=Apr 19 2006, 01:38 PM:name=OriginalSunny)--][div class=\'quotetop\']QUOTE(OriginalSunny @ Apr 19 2006, 01:38 PM) [snapback]366391[/snapback][/div][div class=\'quotemain\'][!--quotec--]
    I have tried create a login page for an administrator so that if the value in admin is 1 it will let the user go through to the next page but it just doesnt work. The code i have used is:

    $sql1 = "SELECT admin FROM Employee
    WHERE empUsername='$_POST[empUsername]'";
    $result1 = mysql_query($sql1)
    or die("Couldn't execute query.");
    if ($result1 == 1)
    {

    ....(go through to the next page)
    }
    else
    {
    (print error message)
    }

    No matter what i do it just seems to output the error message. I have stored the value 1 for one of the employees and 0 for the other but it still doesnt work. Is it an error in my code?? (I have also tried to put "" around the 1 highlighted in bold). Please help!
    [/quote]

    try
    [code]
    $sql1 = "SELECT admin FROM Employee
    WHERE empUsername='".$_POST['empUsername']."'";
    [/code]

    that's single quote, double quote .$_POST['empUsername']. double quoute, single quote, double quote.

    Rob
  9. [!--quoteo(post=366057:date=Apr 18 2006, 04:55 PM:name=shocker-z)--][div class=\'quotetop\']QUOTE(shocker-z @ Apr 18 2006, 04:55 PM) [snapback]366057[/snapback][/div][div class=\'quotemain\'][!--quotec--]
    try this:
    $sql = "SELECT * FROM members WHERE year = '$year' AND membership_no = 0 AND membership_no = '".$_SESSION['MEMIDD']."'";
    [/quote]
    Surely it should be

    [code]
    $sql = "SELECT * FROM members WHERE year = '$year' AND (membership_no = 0 OR membership_no = '".$_SESSION['MEMIDD']."')"; [/code]

    Note the OR and the ()

    Rob
  10. [!--quoteo(post=365916:date=Apr 18 2006, 08:59 AM:name=legendary ssj goku)--][div class=\'quotetop\']QUOTE(legendary ssj goku @ Apr 18 2006, 08:59 AM) [snapback]365916[/snapback][/div][div class=\'quotemain\'][!--quotec--]
    Is there a SMTP server which i can download even...
    HELP
    peoples!
    [/quote]

    If it's you machine you use for testing, put in the SMTP server name of you ISP, eg mail.yourhost.com or smtp.yourhost.com

    Although it won't necessarily work correctly. Just know that when you upload it onto your web server, it will work if it is Linux and if it' windows then I don't know but at least you'll be able to get your hosting provider to help.

    Rob
  11. $dayNumber=date("w", mktime([int hour [, int minute [, int second [, int month [, int day [, int year [, int is_dst]]]]]]] ))


    will give you a number from 0 to 6, with 0 being Sunday. You need to fill in some of the variables in mktime.

    Rob
×
×
  • 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.