Web Design Forum: Milli05 - Viewing Profile - Web Design Forum

Jump to content

WDF
WDF Premium Memberships Reseller Hosting

Milli05's Profile User Rating: -----

Reputation: 3 Neutral
Group:
Members
Active Posts:
64 (0.06 per day)
Joined:
12-April 09
Profile Views:
1,722
Last Active:
User is offline May 14 2012 06:25 AM
Currently:
Offline

My Information

Member Title:
Forum Newcomer
Age:
30 years old
Birthday:
June 23, 1981
Gender:
Female Female
Location:
London

Contact Information

E-mail:
Private
Website URL:
Website URL  http://www.millwebdesign.com
Skype:
Skype  farkaseva_5

Users Experience

Experience:
Beginner
Area of Expertise:
Web Designer

Latest Visitors

Topics I've Started

  1. XMLReader question

    10 March 2012 - 06:30 PM

    Hi , I would like to read az xml with XMLReader, but I have a problem:
    The structure of my xml is as follows:
    <GEO>
    
      <AREAS>
    
        <AREA id="36-2" value="Isztria">
    
          <CITY id="3004388952-9" tax_class="D2" lat="45.3203" long="13.7642">Crklada</CITY>
    
          <CITY id="3004388955-9" tax_class="B27" lat="44.9251" long="14.0297">Duga Uvala</CITY>
    
          <CITY id="3004388919-9" tax_class="D2" lat="45.1731" long="14.0442">Sv. Katarina</CITY>
     </AREA>
    
      </AREAS>
    
    </GEO>
    

    I need to read the values an the attributes as well.
    My problem is that I can not get the attributes of the CITY elements.
    Here is my code:
    while ($reader->read()) {
     if($reader->nodeType==XMLReader::ELEMENT){
    		if($reader->localName =='AREA')
    		{
    		$id = trim($reader->getAttribute('id')); // grab the id 
    		$name = trim($reader->getAttribute('value')); // grab the id 
    		//$username = trim($reader->getAttribute('UserName')); // grab the username 
    
    	
    		echo $id." ".$name."<br />"; // echo the results 
    		
    			
    		$reader->read();
    		}
    		
    		if($reader->localName=='CITY')
    			{
    			
    			$reader->read();
    			$city=$reader->value;
    			
    			
    			$cid = trim($reader->getAttribute('id')); // grab the id 
    			$tax_class = $reader->getAttribute('tax_class'); // grab the id 
    			print '&nbsp;'.$city.'<br />';
    			print '&nbsp;k'.$cid.'<br />';
    			print '&nbsp;'.$tax_class.'<br />';
    			}
    			
    			
    
    	} 
    }
    
    // close the xml file 
    $reader->close(); 
    
    


    Thank you!
  2. Zend request problem

    27 October 2011 - 10:27 AM

    Hi, I am absolutely new to zend and now working with a website based on this framework.
    I am working with a from.
    After sending the from, if there is an error or if you reload the form, the fields are prefilled with the post data.
    I would like to avoid one certeain field to be prefilled, or if it is prefilled, I would like to set the value of it, but so far I had no success.
    I have tried: setParam('name','value');
    setValue('value');

    still the fileds is prefilled with the data posted.
    Can anyone help?
  3. .htaccess rewrite

    06 July 2011 - 02:39 PM

    Hi, I am not sure if what I would like to do is a redirect or a rewrite rule in the .htaccess file.
    Basically, I would like all the links eg.: www.mydomain.com/page1 pointing to my index.php file.
    I have a main swithc there and i include files according to the URL parts.
    What I have so far is:
    RewriteEngine on
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [QSA]
    
    
    


    Now, this one wirks fine whith links like: www.mydomain.com/page1, but if I have a third url part it does not.
    Eg.:www.mydomain.com/testpage/page_1 is not working.

    I am completely new to htaccess, and need a solution badly!
    Thanks in advance!