Jump to content

contra10

Members
  • Posts

    402
  • Joined

  • Last visited

    Never

Posts posted by contra10

  1. i'm tryin to delete messages sent to an inbox... my code is

     

    <?php
    	echo "<tr>";
    	echo"<td><Input type = 'Checkbox' Name ='checkbox' value ='$msgid'></td>";
     echo "<td align='left' width='10%' height='50'>";
    echo"<a href ='http://localhost/profile/index.php?user=$friendid' ><img src='http://localhost/image/imagereplace.php?id=$friendid'></a>";
      echo "</td>";
    	if ($bgcc == $colorvalue){
    	echo"<td width= '90%' align='center' bgcolor='#DEDAD7'><a style='text-decoration:none' href ='http://localhost/inbox/message.php?msg=$msgid' >";
    	}else{
    		echo"<td width= '90%' align='center' bgcolor='black'><a style='text-decoration:none' href ='http://localhost/inbox/message.php?msg=$msgid' >";
    	}
    	echo"<FONT FACE='ariel' SIZE='3' color='#0094f7'><b>$title<br><br></font></td></tr>";
    	echo "<tr><td></td><td></td>";
    	echo "<td align='right' bgcolor='#DEDAD7'><FONT FACE='ariel' SIZE='2' color='#0094f7'>Sent by <b>$sendingusername</b> on $date</font></a></td>";
    echo "</tr>";
    }
    ?>
    <input type="submit" name="delete" value="delete">
    </table>
    </form>
    <?php
    
    if (isset($_POST['checkbox']) and ($_POST['delete'])) { 
    
    $checkboxid = mysql_real_escape_string($_POST['checkbox']);	
    mysql_query("DELETE FROM inbox WHERE iid='$checkboxid'");
    }
    ?>
    

  2. ok that worked and i want to add an extra dropdown menu in

     

    <script type="text/javascript">
    
    // country lists
    var country = new Array();
    
    country['NorthAmerica'] = ['Canada'];
    country['Europe'] = ['Swiss'];
    country['Asia'] = ['China'];
    
    // State lists
    var states = new Array();
    
    states['NorthAmerica'] = new Array();
    states['NorthAmerica']['Canada'] = ['Alberta','British Columbia','Ontario'];
    
    states['Europe'] = new Array();
    states['Europe']['Swiss'] = ['Test'];
    
    
    states['Asia'] = new Array();
    states['Asia']['China'] = ['ChineseProvince1'];
    
    
    // City lists
    var cities = new Array();
    
    cities['NorthAmerica'] = new Array();
    cities['NorthAmerica']['Canada']['Alberta']          = ['Edmonton','Calgary'];
    cities['NorthAmerica']['Canada']['British Columbia'] = ['Victoria','Vancouver'];
    cities['NorthAmerica']['Canada']['Ontario']          = ['Toronto','Hamilton'];
    
    cities['Europe'] = new Array();
    cities['Europe']['Swiss']['Test'] = ['Zurich'];
    
    cities['Asia'] = new Array();
    cities['Asia']['China']['ChineseProvince1'] = ['Los Angeles','San Francisco'];
    
    
    function setCountry(){
    
    contSel = document.getElementById('continent');
      cntrySel = document.getElementById('country');
    
      stateList = states[cntrySel.value];
    
      changeSelect(stateSel, stateList);
      setCities();
    
    }
    function setStates(){
    
    contSel = document.getElementById('continent');
      cntrySel = document.getElementById('country');
      stateSel = document.getElementById('state');
    
      stateList = states[contSel.value][cntrySel.value];
    
      changeSelect(stateSel, stateList);
      setCities();
    
    }
    
    function setCities(){
    
    	contSel = document.getElementById('continent');
      cntrySel = document.getElementById('country');
      stateSel = document.getElementById('state');
      citySel  = document.getElementById('city');
    
      cityList = cities[contSel.value][cntrySel.value][stateSel.value];
    
      changeSelect(citySel, cityList);
    
    }
    
    function changeSelect(fieldObj, valuesAry, optTextAry, selectedValue) {
    
      //Clear the select list
      fieldObj.options.length = 0;
    
      //Set the option text to the values if not passed
      optTextAry = (optTextAry)?optTextAry:valuesAry;
    
      //Itterate through the list and create the options
      for (var i=0; i<valuesAry.length; i++) {
        selectFlag = (selectedValue && selectedValue==valuesAry[i])?true:false;
        fieldObj.options[fieldObj.length] = new Option(optTextAry[i], valuesAry[i], false, selectFlag);
      }
    
    }
    
    </script>
    
    </head>
    
    <body onload="setStates();">
    <form name="test" method="POST" action="processingpage.php">
    
    Continent: 
    <select name="continent" id="continent" onchange="setCountry();">
      <option value="NorthAmerica">North America</option>
      <option value="Europe">Europe</option>
      <option value="Asia">Asia</option>
    </select>
    <br>
    
    Country: 
    <select name="country" id="country" onchange="setStates();">
      <option value="">Please select a country</option>
    </select>
    <br>
    
    State: 
    <select name="state" id="state" onchange="setCities();">
      <option value="">Please select a State/Province</option>
    </select>
    <br>
    
    City: 
    <select name="city"  id="city">
      <option value="">Please select a City</option>
    </select>
    </form>
    ?>
    
    that doesn't seem to transfer any values

  3. I have a dropdown menue that populates when option one is selected...how can I create a thrid option ...dropdown one output dropdown two and dropdown 2 outputs dropdown 3... I also want to use php to enter it into mysql if that is possible

     

    <script type="text/javascript">
    function setOptions(chosen) {
    var selbox = document.myform.opttwo;
    
    selbox.options.length = 0;
    if (chosen == " ") {
      selbox.options[selbox.options.length] = new Option('Please select one of the options above first',' ');
    
    }
    if (chosen == "1") {
      selbox.options[selbox.options.length] = new Option('first choice - option one','oneone');
      selbox.options[selbox.options.length] = new Option('first choice - option two','onetwo');
    }
    if (chosen == "2") {
      selbox.options[selbox.options.length] = new Option('second choice - option one','twoone');
      selbox.options[selbox.options.length] = new Option('second choice - option two','twotwo');
    }
    if (chosen == "3") {
      selbox.options[selbox.options.length] = new Option('third choice - option one','threeone');
      selbox.options[selbox.options.length] = new Option('third choice - option two','threetwo');
    }
    }
    </script>
    

  4. i can't see my images

    <style type= "text/css">
    html, body {
    margin: 0px;
    padding: 0px;
    }
    body {
    font: 10px Tahoma, verdana, sans-serif;
    }
    img {
    border: 0px;
    }
    a {
    color: #575757;
    font-weight: bold;
    text-decoration: none;
    }
    a:hover {
    color: #2B2B2B;
    text-decoration: underline;
    }
    ul {
    margin: 0px 0px 0px 2em;
    padding: 0px;
    }
    li {
    list-style: square;
    margin: 0px;
    padding: 0px;
    }
    .clear {
    clear: both;
    }
    form {
    margin: 0px;
    padding: 0px;
    }
    body {
    background: url("C:\wamp\www\new\bg.jpg");
    }
    .outer {
    background: url("C:\wamp\www\new\bg_top.png") repeat-x;
    min-height: 757px;
    padding: 67px 0px;
    text-align: center;
    }
    #wrapper {
    text-align: left;
    margin: auto;
    position: relative;
    width: 563px;
    }
    #nav {
      background: url("C:\wamp\www\new\nav_bg.png") repeat-x;
    }
    #nav-left {
      background: url("C:\wamp\www\new\nav_left.png") no-repeat;
      width: 100%;
    }
    #nav-right {
      background: top right url("C:\wamp\www\new\nav_right.png") no-repeat;
      height: 33px;
    }
    #nav a, #navb a {
      color: #C0C4AB;
      text-decoration: none;
      font: bold 9px arial, sans-serif;
    }
    #nav a:hover, #navb a:hover {
      color: white;
    }
    #nav ul {
      padding-top: 9px;
    }
    #nav li {
      display: inline;
      padding: 0px 15px;
    }
    #head {
    position: relative;
    height: 157px;
    background: url("C:\wamp\www\new\head_bg.png");
    }
    #head h1 {
    margin: 0px;
    padding: 0px;
    position: absolute;
    top: 45px;
    left: 29px;
    }
    .logo {
      display: block;
      float: left;
      border: 2px solid #B3B79E;
      border-top: none;
      border-bottom: none;
      padding: 0px 5px;
      font: 20px "arial narrow", arial, sans-serif;
      height:55px;
    }
    .logo .top {
      display: block;
      color: #303228;
    }
    .logo .gadgets {
      display: block;
      color: #6C7376;
      font-size: 28px;
      margin-top: 0px;
      line-height: 32px;
      
    }
    #head-left {
    position: absolute;
    top: 0px;
    left: -16px;
    width: 16px;
    height: 200px;
    background: url("C:\wamp\www\new\head_left.png") no-repeat;
    }
    #head-right {
    position: absolute;
    top: 0px;
    left: 562px;
    width: 16px;
    height: 200px;
    background: url("C:\wamp\www\new\head_right.png") no-repeat;
    }
    #navb {
    position: absolute;
    top: 138px;
    left: 10px;
    height: 19px;
    }
    #navb ul {
      margin: 0px;
      padding: 0px;
    }
    #navb li {
      float: left;
      width: 76px;
      height: 19px;
      background: url(small_nav_tab.png) no-repeat;
      margin: 0px;
      padding: 0px;
      list-style: none;
      text-align: center;
      padding-top: 4px;
    }
    #navb a {
      color: #E1E1D5;
    }
    #head-1 {
    position: absolute;
    top: 0px;
    right: 0px;
    width: 237px;
    height: 157px;
    background: url(head_1.jpg) no-repeat;			
    }
    #head-2 {
    height: 184px;
    background: url(head_2.jpg) no-repeat;			
    }
    #login {
    background: url(login_bg.jpg) repeat-y;
    font-weight: bold;
    color: #E1E1D5;
    }
    #login-bot {
    background: bottom url(login_bot.jpg) no-repeat;
    padding: 6px 0px 19px 0px;
    }
    #login-box {
    float: left;
    width: 260px;
    }
    #login h2 {
    margin: 0px;
    padding: 0px 0px 3px;
    }
    #login a {
    color: #303228;
    }
    #login a:hover {
    color: #1C1D10;
    }
    #login-box h2 {
    padding: 0px 0px 3px 30px;
    margin-left: 45px;
    margin-bottom: 3px;
      color: #303228;
      font: 18px "arial narrow", arial, sans-serif;
      background: url(h_login.png) no-repeat;
    }
    #login-box h2 em {
      font-style: normal;
      color: #ECEEE4;
    }
    #login-username {
    float: left;
    width: 195px;
    text-align: right;
    color: #303228;
    }
    #login-username input {
    width: 120px;
    background: #FFFFFF;
    color: #303228;
    font-size: 10px;
    border: 1px solid #60654E;
    }
    #login-username div {
    padding-bottom: 1px;
    }
    #login-button {
    float: left;
    width: 45px;
    margin: 2px 10px;
    }
    #login-box .reg {
    text-align: right;
    padding: 6px 27px 0px 0px;
    }
    #login-welcome {
    float: right;
    width: 278px;
    }
    #login-welcome div {
    padding-right: 23px;
    }
    #login-welcome h2 {
      color: #4E523F;
      font: 20px "arial narrow", arial, sans-serif;
      margin-bottom: 0.3em;
      padding-bottom: 0px;
    }
    #login-welcome p {
      margin-top: 0px;
    }
    #body {
    background: url(body_bg.png) repeat-y;
    }
    #body-bot {
    background: bottom url(body_bot.png) no-repeat;
    padding-bottom: 20px;
    }
    #body h2 {
    margin: 0px;
    padding: 0px;
    background: url(body_top.png) no-repeat;
    height: 60px;
    color: #303228;
      font: normal 18px "arial narrow", arial, sans-serif;
    }
    #body span {
      position: relative;
      top: 25px;
      left: 40px;
    }
    #body h2 strong {
      color: #982801;
      font-weight: normal;
    }
    #footer {
    background: url(footer_bg.png);
    margin: 0px 1px;
    text-align: right;
    padding: 42px 26px 30px 0px;
    position: relative;
    }
    #footer p {
    margin: 0px;
    padding: 6px 0px;
    }
    #footloose {
      text-align: left;
      position: absolute;
      top: 10px;
      right: 30em;
      margin: 0px;
      padding: 0px;
      text-indent: 0px;
    }
    #footloose .logo span {
      top: 0px;
      left: 0px;
    }
    #items {
    margin: 8px 0px 0px 29px;
    color: #36382E;
    font: 9px tahoma, verdana, sans-serif;
    }
    .item {
    float: left;
    width: 228px;
    margin-right: 31px;
    }
    .item h3,.item h3 a {
    font-size: 11px;
    margin: 12px 0px 6px 0px;
    color: #2B2B2B;
    }
    .item p {
    padding: 0px;
    margin: 0px 0px 10px 0px;
    }
    .item .details, .item .addtocart {
    font: 11px arial, sans-serif;
    color: #FFFFFF;
    font-weight: bold;
    padding: 1px 5px;
    }
    .item .details:hover, .item .addtocart:hover {
    text-decoration: none;
    color: #FFFFFF;
    }
    .item .details {
    background: #982801;
    }
    .item .addtocart {
    background: #60654E;
    }
    .item .details:hover {
    background: #BE3302;
    }
    .item .addtocart:hover {
    background: #73795F;
    }
    .item .divider {
    clear: both;
    height: 10px;
    background: bottom url(dash.png) repeat-x;
    margin-bottom: 8px;
    margin-left: 12px;
    margin-right: 16px;
    }
    .left {
    float: left;
    padding-right: 12px;
    }
    .right {
    float: right;
    margin-left: 9px;
    }
    #banner {
    height: 121px;
    margin: 0px 11px;
    background: #D4D4C5 bottom url(banner.png) repeat-x;
    }
    #banner-text {
    color: #474747;
    padding-top: 15px;
    float: right;
    width: 252px;
    }
    #banner-text h3 {
    font-size: 11px;
    margin: 0px 0px 2px 0px;
    padding: 0px;
    }
    #banner-text a {
    color: #036292;
    }
    #banner-text a:hover {
    color: #982801;
    }
    </style>
    

     

    this is in a php file

  5. i have a code on one of my profile.php page and the css code is

    <html>
    <center><div class="bl" align="center" ><div class="br"><div class="tl"><div class="tr">
    <b>Advertisments</b>
    </FONT>
    </div></div></div></div> 
    <style>
    .bl {background: url(bl.png) 0 100% no-repeat #0094f7; width: 25em; height:5em; margin-center: 60px}
    .br {background: url(br.png) 100% 100% no-repeat; height: 5em;}
    .tl {background: url(tl.png) 0 0 no-repeat}
    .tr {background: url(tr.png) 100% 0 no-repeat} 
    </style>
    </center></html>
    

     

    when i include my header the border which is supposed to be

     

    <html>
    <div class="bl" align="center" ><div class="br">
    ....
    ....
    </div></div>
    <style>
    .bl {background: url("C:\wamp\www\bl.png") 0 100% no-repeat black; width: 60em; height:2em; margin-center: 0px}
    .br {background: url("C:\wamp\www\br.png") 100% 100% no-repeat; height: 5em;}
    </style>
    	</center>
    </html>
    

     

    takes on the shape of the border on profile.php page...i checked to see if all my tags were closed and they are

     

  6. well i guess this is a css problem im doing a mouseover on my page and i just want a particular section to be mouse mouse over highlighted... instead my whole page has a background color ...i know i closed my tages heres my code

     

    <html>
    <style type="text/css">
    img
    {
    opacity:0.4;
    filter:alpha(opacity=40)
    }
    </style>
    <body>
    
    <img src="C:\wamp\www\event.png" width="80" height="20" alt="klematis"
    onmouseover="this.style.opacity=1;this.filters.alpha.opacity=100"
    onmouseout="this.style.opacity=0.4;this.filters.alpha.opacity=40" />
    </body>
    </html>
    

     

    everything after this code should be regular colors

  7. ok the common field is coming up... is there a way to have all the common fields echoed...i thought the while statment would do that...

     

    this worked for me

    <?php
    
    $query2 = "SELECT DISTINCT * FROM friends WHERE `username` ='$username' OR `username` = '$userq' ORDER BY friendname ASC";
          $result2 = mysql_query($query2);
          while ($row2 = mysql_fetch_assoc($result2)){
          
          $bld = "{$row2['friendname']}";
       }
    
    ?>
    

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