Jump to content

GremlinP1R

Members
  • Posts

    62
  • Joined

  • Last visited

    Never

Everything posted by GremlinP1R

  1. Okay hehe my mistake! The 13digit numer always change! But just need position 5 and 6's numbers
  2. Hai there. I'm trying to get just 2digits out a 13digit number. The number looks as follow 1234567890123 now I only whant it to show nuber 56. How can I do this? Can any one pls help me! What I tryed were $num = $row['num']; $nu = ereg_replace("[color=red]problem[/color]","",$num); Okay I'm sure there's a beter  way of doing it, But thats how far my brain can think.
  3. Okay well if you have all the links on the header.php Why not make your header the main page (index.php), so it will have all its info and include home.php and footer.php on that page. Then you can give your link a name lets say Page2 and set it as a form with action='' and method='post'. al you do from there is tel the system what to do. if (isset($_POST['page2'])){include('page2.php');} elseif (isset($_POST['page3'])){include('page3.php');} and so on and then just to make you home page as default else {include('home.php');}
  4. You create a background file. lets say your main page is Home.php create a Background.php file (any name) then you put all your comands in there that you would have done for the submit button. But just the PHP commands no other html and things. Then in your Home.php you just tell him to include('background.php'); As you open the home.php it will auto maticly run the background.php in the background of the page and execute all comands in there.
  5. Try to make the post data script in a defernt file with just comands and just include it in the origanal page
  6. There you go hope it will help you <?php $id = $_GET['id']; if ( strlen( $id ) < 1 ) $id = "home"; $pages = array( home => array( id=>"home", parent=>"", title=>"Home", url=>"showpage.php?id=home" ), users => array( id=>"users", parent=>"home", title=>"Users", url=>"showpage.php?id=users" ), jack => array( id=>"jack", parent=>"users", title=>"Jack", url=>"showpage.php?id=jack" ) ); function breadcrumbs( $id, $pages ) {   $bcl = array( );   $pageid = $id;   while( strlen( $pageid ) > 0 )   { $bcl[] = $pageid; $pageid = $pages[ $pageid ]['parent'];   }   for( $i = count( $bcl ) - 1; $i >= 0; $i-- )   { $page = $pages[$bcl[$i]]; if ( $i > 0 ) { echo( "<a href=\"" ); echo( $page['url'] ); echo( "\">" ); } echo( $page['title'] ); if ( $i > 0 ) { echo( "</a> | " ); }   }   }   ?>   <html>   <head>   <title>Page - <?php echo( $id ); ?></title>   </head>   <body>   Breadcrumbs: <?php breadcrumbs( $id, $pages ); ?><br/>   Page name: <?php echo( $id ); ?>   </body>   </html>
  7. Just to understand somthing here, Do you want the site to work like frames? Are you just including you one page on the other?
  8. Hi There. Im trying to search my database in one spesific row where the number must contain xx number in a certain space like 85xx87643 it must always be in that position, where everything aroun the xx might change. Can any one help me please. SELECT * FROM table WHERE row LIKE ? there I do not know how to put it. I tryed wildcards (%) but that surge thru the whole number of the xx.
  9. Oh Thanx HuggieBear. Your a life saver, Have treid or but done it the wrong way. But its working now thanx! Regards Gremlin
  10. Hi There All. I'm doin a script with an advance search function but are batteling to get working. Every thing are working 100% except this one field. In the data base I have a Company1 - Company0 thats equil to Company10. Now for my search I need to search for a spesific field in all ten tables, or must I call them rows? Okay this is what I have..... // Get all the data from the "Users" table   if ($select == Company){$result = mysql_query("SELECT * FROM individuals WHERE Company* LIKE ('%$for%') AND `Active` = 0 ORDER BY Surname ASC ");}   else {   $result = mysql_query("SELECT * FROM individuals WHERE $select LIKE ('%$for%') AND `Active` = 0 ORDER BY Surname ASC ");} There on the first line is my problem, where it says Company*, Now I have treid making it % and I have treid to put in more than one but then I just get errors! Can any one please help!
×
×
  • 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.