Jump to content

RussellReal

Members
  • Posts

    1,773
  • Joined

  • Last visited

Posts posted by RussellReal

  1. that I must say is pretty slick :)

     

    Where there is a will there is a way.  A hacked together way would be this.  We're going to pretend you have a text element named 'name0'.

     

    Set a session variable called '$count'.  Every time the page is visited count should be increased by one.  When the php script builds the page it should change the name of the text box to fit the pattern "name".($count+1).  Then whenever the page loads have it check for the $_POST["name$count"].

     

    Every time the page reloads the script will look for a differently named POST variable.  That means that only one that was just submitted will be accepted (because the name matches what PHP is looking for), any leftovers from a browser refresh will be rendered useless.

  2. WELL

     

    1 thing I can say is..

     

    name your file

     

    install_settings.config.php

     

    including a txt file does the same as including a .php, however... If a user does

     

    yoursite.com/install_settings.config

     

    they'd get alot of information about your site.. and thats never good.. keep it secret.. keep it .php

     

    ALSO

     

    // config.php
    $var1 = "hello";
    

    // workit.php
    echo $var1;
    

    // index.php
    include('config.php');
    include('workit.php');
    

     

    that should display "hello" if it doesn't maybe reinstall php :S idk wat else to say

  3. ok I have an object right

     

    lets say sumfin like this:

     

    function handleThisEvent() {
      // HOW do I reference this event's CALLING xmlHTTPRequest object?
    }
    function What() {
      a = new XMLHttpRequest();
      a.open("GET","whatever.php",true);
      a.send(null);
      a.onreadystatechange = handleThisEvent;
    }
    abc = new What();
    

    inside handleThisEvent how would I reference "a" the xmlHTTPRequest object specified in the What object..

     

    without making a global variable equal to "a"

  4. <img src="whatever.jpg" id="image" />
    <script type="text/javascript">
    function resizeImage(image) {
    vh = window.innerHeight;
    vw = window.innerWidth;
    if (""+vh+"" == "undefined") vh = document.documentElement.offsetHeight;
    if (""+vw+"" == "undefined") vw = document.documentElement.offsetWidth;
    if (image.width > image.height) {
    	cRat = image.height / image.width;
    	image.height = vh * cRat; 
    	image.width = vw;
    } else if (image.height > image.width) {
    	cRat = image.width / image.height;
    	image.height = vh;
    	image.width = vh * cRat;			
    } else {
    	image.height = Math.min(vh,vw);
    	image.width = Math.min(vh,vw);
    }
    }
    resizeImage(document.getElementById("image"));
    </script>
    

  5. You could make a file called

     

    xmlnews.php

     

    and echo like

    <content>

      <newsItem>

        <date>10/25/08</date>

        <subject>Titanic2 goes down! Rose JR. is a prostitute!</subject>

        <text>Yeah, when the titanic went down it felt sooooo goood, then a voice came out of no where "Give me $50 dollars...."</text>

      </newsItem>

    </content>

     

    flash has xml handlers

  6. ok bro, well, you don't seem to be understanding me..

     

    so I'll try to explain it 1 more time, not being mean or anything...

     

    the URLLoader I linked you to in as3, is like php's file_get_contents function.. which gets the contents of the file..

     

    now..

     

    like you'd parse weather.com to get the weather to show up on your website.. you'd parse your own site.. or make a php file.. which outputs ALREADY PARSED information.. that way when you use the data you parse form this file in flaqsh.. its that much easier..

     

    in flash you need to create text fields for text..

     

     

    and then you put the parsed data inside the text areas..

     

    you can't just do sumfin like

     

    include("your file");

     

    theres no such thing in flash (I don't think) YOu need to parse your data in flash, from 1 of your php files.. then display the data

     

    sorry if you don't understand what I'm saying.. I hope someone else will read this and explain it better to you

  7. ok your query is messy..

     

    try this.. I'm not sure it'll work.. but it looks like it should:

     

    $sql = "SELECT *.city_id, *.max_bet, *.owner_id
    FROM blackjack
    JOIN (coinflip,keno,roulette,war,slots,bulletfactory,airport,ironworks)
    ON (
    coinflip.city_id = keno.city_id,
    keno.city_id = keno.city_id,
    roulette.city_id = keno.city_id,
    war.city_id = keno.city_id,
    slots.city_id = keno.city_id,
    bulletfactory.city_id = keno.city_id,
    airport.city_id = keno.city_id,
    ironworks.city_id = keno.city_id
    )
    WHERE keno.city_id = '{$row['id']'";

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