Jump to content

twinklerip

Members
  • Posts

    14
  • Joined

  • Last visited

Posts posted by twinklerip

  1. Is there a function in PHP that can return substring from a string between 2 given positions.Example:If i'd like the character between postion 3 and 10 from the string "This function may". That result would be "s func"Or is there a function that can trim the characters upto certain positions from the left and another function that can trim the characters to the right from certain position.

  2. i got this example somewhere

    <?phpini_set("register_globals", "on");if($_SERVER['QUERY_STRING'] == "") {    // Main Page    echo "main page!!";} elseif($_SERVER['QUERY_STRING'] == "about") {    // About page    echo "about page!!";} elseif($_SERVER['QUERY_STRING'] == "contact") {    // Contact page    echo "contact page!!";} else {    // Page not found    echo "Oops.. Page not found (404)";}?>

    when i use http://localhost/Untitled-2.phpit says

    Notice: Undefined index: QUERY_STRING in c:\Inetpub\wwwroot\Untitled-2.php on line 12main page!!
    how do i get rigd of the notice?and one more thing what is ini_set("register_globals", "on") for?
  3. Something like this?
    positioning is off. i think i'm gonna go with div and table combination. as div is harder and table is messy. div - table combination would minimize the mess and would be easy.
  4. i can't get this to work. i've been trying a lot of things... fixed positioning, floats etc. but not working.

    <html><head><style type="text/css">body{text-align:center;}#bdy{width:770px; height:auto;}#header{height:100px; width:100%;}#navbar{	float:left; 	width:10em;	/*height:???;	height of #bdy is unknown. so if i use 100%, the result is same as auto.   	 i want it's height = (height of #bdy - height of #header) */	}#navbar2{	float:right;	width:20em;	/*height:???;	just like #navbar*/	}#content	float:left;  /*should i use float:left? */	width:auto;	height:auto;	/*the height of #content is unknown and it determines the height of #bdy*/	}	</style></head><body><div id="bdy">	<div id="hearder">	</div>		<div id="navbar">		</div>		<div id="content">  	</div>		<div id="navbar2">		</div></div></body></html>

    The page should look something like this:samp.gif#bdy should appear in the middle and everything else should be in side that div tag.

  5. there are gonna be 2 inputs, catid & pagemun... switch satement can be used.if catid=2 and pagenum=1 then it'll show some htlm code stored in a file named pm2_1.txt, if catid=2 & pagenum=2 then the file ud be pm2_2.txt and so on...can any one help me?<html><head>....</head><body>........<div><?php codes (nested switch)?></div>........</body></html>

  6. is there any special requirment to use css2 along with css1?css2 pseudo-class :first-child has no effect on my browser (MSIE6). not jsut :first-child, :lang also. donno about :focus.

  7. i'm new to HTML, CSS and JavaScript. currently i'm working on a personal webpage. facing few problems. here's one of'em. there is this huge HTML file. i want to split it into a HTML and several other code files (that will contain some HTML code, may be some headings, paragrapgs and anchors) and when i'll click a link/button in the main page, the content of one of those files will be displayed between a certain tag, say <div id="d1"></div>. when i'll click another link content of another code file will be loaded between those <div id="d1"></div> tags, replacing the previous content. i want to do this without an inline frame, without refreshing the whole page and withouth loading the whole file & hiding some of its content. preferably with simple javascript (i don't know asp/jsp). is this possible? if so, then how? can any one help me?thanx in advance.

×
×
  • Create New...