Jump to content

kampbell411

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Posts posted by kampbell411

  1. Your right sorry. Here is basically all the details. I am trying to write while passing two variables, a state abbreviation and a city name.

     

    http://www.example.com/city/{stateAbreviation}{cityName}.html

     

    to

     

    http://www.example.com/{stateAbreviation}{cityName}.html

     

    I am linking to http://www.example.com/city/{stateAbreviation}{cityName}.html from http://www.example.com/state/{stateAbreviation}.html

     

    as http://www.example.com/{stateAbreviation}{cityName}.html but I am getting a 404.

     

    Here is what I tried in my root htaccess of my domain but it didn't work. Should I try putting an htaccess in my city directory?

     

    RewriteRule ^([A-Z]{2})/(.*)\.html /city/index.php?st=$1&id=$2 [L]

     

    also tried

     

    RewriteRule ^(.*)/(.*)\.html /city/index.php?st=$1&id=$2 [L]

  2. I've been going crazy on how to figure this out. Kinda new to php. I'm trying to get array results outside of a while loop. Im basically trying to put my results into an array and then set those array values as a variable to use outside of while loop. Im trying to load addresses into a jquery plugin that plots multiple points. I wanted to get the addresses from DB then store in variable with the addresses and use that variable in my javascript.

     

    $sql = "SELECT zip, state, city FROM $tbl_name WHERE state = 'value';
        $result = mysql_query($sql);
        while($row = mysql_fetch_array($result))
    {
    $zip = $row->zip;  
    $state = $row->state;
    $city = $row->city;
    
    $newzip= $row['zip'];
    
    $addresses = array(
        array("address"=>$newzip),
           );
    }
    echo $addresses;  <---would like to do something like that with all the values put in $addresses the array
    

     

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