Jump to content

Nomax5

Members
  • Posts

    62
  • Joined

  • Last visited

    Never

Posts posted by Nomax5

  1. I like the book idea and think there is room for all sorts of book interfaces from simple ones to that fantasic example
    Interfaces moddeled on familiar realworld objects is is good imho

    online filofax for example holding your favorites calendar contacts etc.

    so although it's been done before in a fantastic way don't give up on the idea.

    Roy
  2. What is the most efficient way to parse a submitted url for a given string

    I was thinking something along these lines but I’m not familiar with this sort of thing.

    [code]$website = "http://www.justasign.com";
    $clue="Sale sign displaying"
    $secret_word="your";

    fopen($website, "r");
    strstr[/code]

    but then I got to thinking about buffer and timeout and thought I'll ask the experts..

    [b]Background and why[/b]

    I have this new website, it’s a lottery for websites where you win traffic as the prize

    It works like this:

    To enter the lottery you have to visit todays winning website and find the secret word using the clue:

    Then you enter 
    Todays secret word found on the winning webpage
    Your website
    A secret word from your content
    And a clue (the 3 words before your secret word)

    If you win then tomorrow everyone has to visit your website to find the secret word.

    I am manually checking each entry for the clue and the secret word but I need to automate it somehow.

    I’d like to run the code if fast enough at the point someone enters their website so I can error message them

    If not I could loop through the entries and check them all prior to running the lottery.

    Any help greatly appreciated

    Roy
  3. I want people to be able to right click images I make with php and “Save As…”

    if I create a jpeg within test.php with imagejpeg(“$im);  which outputs it to the browser.
    when I right click the image its called  “test.php” how do I make it called “something.jpg” instead?

    I’m thinking my visitors will save it with the .php extension and get confused.
    I don’t want to save it as a file if I can help it because there will be many of them.

    Any ideas?
  4. Hi,

    On one of my hosts the code below works but on the other I can an error, I am wondering if it’s a permissions thing.

    It also works fine outputting to the browser but when I try to output the gif to a file I get this error:

    <br />
    <b>Warning</b>:  imagegif(): Unable to open 'images/canvasfile.gif' for writing in <b>/nfsn/content/blinkingphoto/htdocs/test.php</b> on line <b>4</b><br />

    this is the code any ideas?

    [code]
    <?php
    header ("Content-type: image/gif");
    $canvas = imagecreatefromgif("images/bird1.gif");
    imagegif($canvas,"images/canvasfile.gif");
    imageDestroy($canvas);
    echo "file created";
    ?>
    [/code]

    I am not very familiar with setting up stuff like this.
  5. I have this concept website: the goal is to find out who “visitors” are because incredibly no one knows!

    The idea is to collect basic demographic data from visitors in return for showing them what type of person visits that particular site.

    The best way to describe this prototype is to see it in action: Click the
    “GAK this” button on the right side of this page. http://www.folksin.com/

    To see what more data looks like I've set up a test - http://www.cgass.com/gak_test.html

    [b]If you are interested in GAK or joining the team let me know[/b]
    We’re looking for very good javascript mysql php, SEO and promotion skills.
    We make websites only for ourselves,  websites that offer a service and generate revenue from subscription or advertising and require very little maintenance.

    As far as money goes – There is no financial outlay on your part, only your time. And we’ll share the profits equally.

    Roy
  6. I asked this question on the PHP help and one suggested I came here.

    Suppose I have this form containing only radio buttons
    [code]
    <form action="nextpage.php" method="get">
    <input type="radio" name="form_gen" value="male"  />Male
    <input type="radio" name="form_gen" value="female" />Female

    <input type="radio" name="form_car" value="bmw" />BMW
    <input type="radio" name="form_car" value="ford"  />ford
    <input type="radio" name="form_car" value="jeep" />jeep
    <input type="submit" name="submit" id="submit" value="Submit">
    </form>
    [/code]
    if a visitor just clicks submit then off it goes with no data.

    Is there a simple way of checking the visitor made a selection before it goes to nextpage.php?

    using isset or something?


  7. Suppose I have this form containing only radio buttons
    [code]
    <FORM action="nextpage.php" method="get">
    <input type="radio" name="form_gen" value="male"> Male
    <input type="radio" name="form_gen" value="female"> Female
    <input type="radio" name="form_car" value="bmw"> BMW
    <input type="radio" name="form_car" value="ford"> ford
    <input type="radio" name="form_car" value="jeep"> jeep
    <INPUT type="submit" value="Submit">
    </FORM>
    [/code]

    if a visitor just clicks submit then off it goes with no data.

    Is there a simple way of not going to nextpage.php unless they’ve made their selection?

    Using isset or something?

    If I use a phpself thing then I always have a problem getting to nextpage.php with headers already been sent etc.

    Or do I have do the validation in nextpage.php then go back somehow?

    I have been searching for a solution but they all seem like overkill.

    Thanks
  8. wow how do you guys do it?

    I mean how do you work?

    This is what I do
    I have my php editor on my PC,
    I make a change (small)
    flip to ftp drag n drop it
    then go to the website to see if it works

    I get very few error messages - nothing happens if it fails usually

    then I rinse and repeat

    do you have some sort of interactive sql thing going on?

    also a little off topic how do I round off the percentages please?
    I've got 22.222222222222% etc.
  9. I get an ERROR in SELECT with that statement

    The field names are different but this is what I've got

    [code]
    $sql = "SELECT gak_ctry, gak_gend, gak_age, gak_kids, count(*) as total";
    $result = mysql_query($sql,$connection) or die ("ERROR in $sql");
    $row = mysql_fetch_array($result);
    echo "[" . $total . "]";
    [/code]
  10. yes I have king arthur example working I think

    But How do I access the total for a particualar group? 

    suppose I had 10 records for a certain car say BMW
    and on 3 of those records were exactly the same  then that would constitute 30%
    it's only where records are exactly the same I'm not interested in
    how many US females drive BMW's
    or even US females with kids drive BMW's
    only when all the variables are the same  US females 30's kids

    so in the above example at some point that "total" in the select statement = 3  how do I define that in php

    echo total; or result(total) or something?
  11. Ahh I understand....  I'm just a little old fashioned with databases and am always concerned about accessing them needlessly.

    You know seeing as disks are slow and mechanical, and indexes my exist in memory …

    Thank both of you very much for your help.

    This really is one of my very favourite websites.

    PS PHP Freaks is in my Website Charts you can vote for it here http://www.votedtop.com/Web/PHP-Help-PHP-Freaks
×
×
  • 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.