Jump to content

mpempas

Members
  • Posts

    15
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

mpempas's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello, im using this command ($_SERVER['REQUEST_URI']) when visiting mysite.com/forum/* to load diferent thinks than mysite.com , mysite.com/news/ Here is my code which ive try everything but still cant get it work. If (strpos($_SERVER[’REQUEST_URI’], "/forum/") == 1) { i want when im not visiting /forum/* do load diferent thinks } Thank you
  2. Ive looked around but with no luck at all, i have a peace of code and when im visiting my site with www.mysite.com/?action=something everything is gread, but when im trying to load the content from www.mysite.com/something/ it goes to the default content becuse it cant find the file??!!? Here is the code hoping someone can help me out with this. <?php if(file_exists($rootpath.$new_site.'.php')) { require_once($rootpath.$new_site.'.php'); } else { // echo('file not found /'.$new_site); $_SESSION['default_cat'] = 1; require_once($rootpath.$con_folder1.'/intro.php'); } ?> Hope anyone can give me solution Thank you
  3. Hello, i know how to build a simple dro-down list, im looking for a code when im gonna choose from the select box something a new drop-down will appear next to the default one with sub-categorys. Example i have a drop-down with 3 countrys: UK Italy USA This is gonna be on the default drop-down box When i choose UK a sub-category drop-down box will appear with other choices. Any help from the experts please Thank you
  4. I need an expert help, i have a drop-down select box and i would like to change language from here. The code is working but the problem is: 1. When im changing language english is still the first in the drop-down box and i cant change back to english, so when change a language the defualt one would be the one im using. 2. If there is any way do not change website to ?locale=en/el just refresh and active this language. Im using $_SESSION['langSYS'] <form name='language_switcher' method='post'> <select name="language" id="language" onChange="location.href('?locale='+this.value)"> <option value="en">English</option> <option value="el">Ελληνικά</option> </select></form> thank you
  5. Hello, i have this code jQuery(document).ready(function(){ jQuery(".btn-slide4").click(function(){ jQuery("#panel4").slideToggle("slow"); jQuery(this).toggleClass("active"); return false; }); }); is a simple code when clicking on the tab ti expand and show more info... what im trying to do is be always open not only when im clicking.. and close only when i click on it. Thank you
  6. thank you so much J, working perfect @haku: i try to edit my post when ive notice my mistake but i could. Sorry about that
  7. Thank you for yout reply J no something else is wrong Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in
  8. Hello, im trying to make a link and when click on it it will open a link to a small win (i have that code and its working) but i cant make it work with php Thisi s the original code wihich is working with html <a href="javascript:ReadAnnouncement(' $row['id_press'];',' $row['id_press'];');"> echo "<td class='selOverview'><a href=\"javascript:ReadAnnouncement(' $row['id_press'];',' $row['id_press'];')" . $row['title'] . "</a></td>"; Any help pls?
  9. Parse error: syntax error, unexpected '<' in (line 56) <!--<select name="user_position" id="user_position" class='textbox'>--> <?php foreach($user_position as $key => $value) { echo "key: ".$key.", value: ".$value.", user_position:".$row['user_position']."<br>"; $selected = ''; if($key == $row['user_position']) { $selected = ' selected="selected"'; } <!--echo '<option value='".$key."".$selected.">".$value."</option>-->"; <----------------------------- } ?> <!--</select>--> </td>
  10. Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' (line 52) <!--<select name="user_position" id="user_position" class='textbox'>--> <?php foreach($user_position as $key => $value) { echo "key: ".$key.", value: ".$value.", user_position:".$row['user_position']."<br>" $selected = ''; <-------------------------------- if($key == $row['user_position']) { $selected = ' selected="selected"'; } <!--echo '<option value='".$key."".$selected.">".$value."</option>-->"; } ?> <!--</select>--> </td>
  11. again no luck .. its display the first in the list not the corrent is in the database
  12. $user_position = array ( 1 => 'test drop-down 1', 2 => 'test drop-down 2', 3 => 'test drop-down 3' ); Edided code: <select name="user_position" id="user_position" class='textbox'> <select name="user_position" id="user_position" class='textbox'> <?php foreach($user_position as $key => $value) { $selected = ''; if($key == $row['user_position']) { $selected = "selected='selected'"; echo "<option value='".$key."'".$selected.">".$value."</option>"; } } ?> </select> </td> If i use the above fixed code its not even has a drop down list..
  13. Hello, Ive found this code by google <select name="user_position" id="user_position" class='textbox'> <?php foreach($user_position as $key => $value) { if($_SESSION['user_position'] < $key) { $selected = ''; if($key == $row['user_position']) { $selected = ' selected="selected"'; } echo('<option value="'.$key.'"'.$selected.'>'.$value.'</option>'); } } ?> </select> </td> But i cant make it work, i want im going to edit a user profile to 'auto' select the existing choice i have on the database .. Any help please? Thank you
×
×
  • 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.