Jump to content

gristoi

Members
  • Posts

    840
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by gristoi

  1. Depends what the site is going to be used for. If it is going to be a fully fledged e commerce site then drupal would be a good bet. If it is just a simple blog style site then have a look at using something like wordpress.

    Its all down to personal preference, and if you want to build it yourself or not. Even though these packages are proven and tested it never hurts to have a go yourself. This helps to give you a better understanding of the principles involved, i.e design patterns etc.

  2. $res = mysql_query("SELECT * FROM cities", $hd)
    echo "<form action ='' method='POST'>";
    echo "<select>";
    while($row = mysql_fetch_array($res))
    {
      echo "<option value='{$row['city_code']}'>{$row['city_name']}</option>";}echo "</select>
    }
    echo "</select>";

    echo "<input type='submit' name='submitForm' value="Submit"/>";

    </form>

  3. FCOMMENT is just an alias name given to the fieldname, it could be called bob for all the difference it would make. Your mysql error is actually telling you that your error is with:

    t1.*

  4. {"responseStatus":"err","responseMsg":"ajax"}

    if (response.responseStatus == 'err') {

        if (response.responseMsg == 'ajax') {

          alert('Error - this script can only be invoked via an AJAX call.');

     

    your code is doing exactly what it is coded to do. What is the problem?

     

  5. Which column does the variable relate to?, for example if it related to the Mobile column:

    SELECT Business_Name,First_Name,Last_Name,Username,Email,Phone,Mobile,Social_Media,Web_Site,User_Language,Admin_Level FROM customer WHERE Mobile = '$variable'

  6. Instead of passing the datetime and then running another function to reformat, try using the

    Date_format(mydateField, 'd/m/Y H:i:s')

    Within your query. The main reason you use a datetime in mysql is that it has an enormous array of functions that can be run against it, one of them

    Being formatting.

  7. 1. does the image exist on the server / your pc.

    2. is the images folder sitting in the same directory as this test script.

    3. you could try and see if the file exists:

     if (file_exists("images/bottlesandcaps/diamondbottles/smalldiamonddarkblue.gif")) {
            echo"image exists!";
        } else {
            echo"image does not exist!";
        }
    

     

  8. <?php
    
    // connect to the database
    include('connect-db.php');
    
    // get id value
    $id = $_GET['id'];
    echo "$id";
    
    $sql="SELECT * FROM events WHERE type='beacon'";
    $result=mysql_query($sql);
    
    
    $active=($result['publish']=='')?'Yes':'No';
    echo "$active";
    
    if ($active='Yes') {
        $active='No';
    } else {
        $active='Yes';
    }
    $sqltwo = "UPDATE events SET publish='$active' WHERE ID='$id'";
    $resulttwo = mysql_query($sqltwo);
    
    // header("Location: beacon.php");
    ?>
    

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