Jump to content

narjis

Members
  • Posts

    107
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

narjis's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. i am trying to show images on my show a images of my products and checking the image files using file_exists function although my images are present in the correct path, images are not showing instead no image found is being displayed. Here in my code: foreach($products as $pros){ if(!file_exists(site_url()."theme/default/images/". $pros['image'])) $img = site_url()."theme/default/images/noimage.jpg"; else $img = site_url()."theme/default/images/". $pros['image']; ?> <li> <div class="prodImage"> <a href="<?=site_url()?>/marketplace/products/<?= $pros['id']?>"> <img src="<?=$img?>" alt='No image' /> </a> </div> <div class="ptitle"><?=$pros['name']?></div> <?php echo "<div class=\"description\">".$pros['description']."</div>"; $attribs = array('id'=>'css_id', 'class' =>'viewLink'); echo "<div class=\"view\">".anchor('marketplace/products/'.$pros['id'],'View',$attribs)."</div>"; ?> <div class="clear"></div> </li> <?php }?> </ul>
  2. I am trying to plot locaytyion on google map using input as logitude and latitude using the following script but somehow it is not giving the correct results and showing a blank blue sreen on the resulting div. I've attached the file please somebody help me googleMap.php
  3. i am trying to link a url to one of my controller from the top menu but each time it is appending the controller in the url. here is the code of my header.php <nav class="main-navigation clearfix span12" role="navigation"> <h3 class="assistive-text">Main menu</h3> <ul> <li class="current"><a href="index.html">Home</a></li> <li> <a href="blog/about">About</a> <ul class="sub-menu"> <li><a href="#">Subpage</a></li> <li><a href="#">Subpage 2</a></li> </ul> </li> <li><a href="contact.html">Contact</a></li> </ul> </nav> on clickng the About link the url keeps on extendig blog/blog/blog....../about. How to resolve this issue.
  4. what is the best architecture for developing a web application like this one:http://www.complinet.com/recruitment/ I need some guidence in forming directory structure and building a proper web app without using any framework, if somebody can recommentd some book I'll be thankful. Thanks in advance
  5. narjis

    small question

    thanks a lot Thank GOD I didn't argue on this with my colleague.
  6. Is it necessary to have a form outside a table in other words if we write a table line before a form in html is it wrong? Please let me know.
  7. I'm trying to open a select box on clicking the input box. Can any body tell how is it possible.
  8. How can I embed styles and legent inside the select box. I've send an attachment. If anyone knows how this can be done. Please let me know.
  9. Really!!! I just updated the column values after selecting from a drop down box.
  10. Actually I didn't understand they way enum column can be updated now I've found the solution that enum values are stored in the form of index starting from 1. they can be updated in the very same manner. Thanx anyway.
  11. I've been trying to edit my enum values in the database while retrieving them at the same time and if required editing them.How can i do that we'll I've tried the following code. The form which is inserting the values is as follows <?php mysql_connect("localhost","root",""); mysql_select_db("Test"); if(isset($_POST['status'])){ $val=$_POST['status']; $sql = "INSERT INTO test_tb (my_opt) VALUES ('".$val."')"; echo ($sql); if (mysql_query($sql)){ echo "Inserted"; } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <form method="post" action=""> <select name="status" class="chzn_status" style="width:250px"> <option value="0">Seelect Procress</option> <option value="In Process">In Procress</option> <option value="Completed">Completed</option> <option value="Deadline Crossed">Deadline Crossed</option> </select> <br /> If u want to view or edit ur insersions <a href='enumEg2.php'>click </a>here <input type="submit" value="submit" /> </form> </body> </html> and the one which is editing and updating is as follows. <?php mysql_connect("localhost","root",""); mysql_select_db("Test"); $arr = array("In Process", "Completed","Deadline Crossed"); $sql = "SELECT * FROM test_tb "; $table="<table border='0' >"; $res = mysql_query($sql); while($rows = mysql_fetch_assoc($res)) { $table .= "<tr><td>".$rows['id']."</td>"; $table .= "<td>"; $table .= "<form method='post' action=''><select name=\"status\"> <option value=".$rows['my_opt'].">". $rows['my_opt'] ."</option>"; foreach($arr as $key=>$val){ $table .= "<option value=$key>$val</option>"; $table .= ($val==$rows['my_opt'])?$rows['my_opt']:''; } $table .= "</form>"; $table .=" </select><td><a href='enumEg2.php?opt_id=".$rows['id']."&opt=".$_REQUEST['name']."'>Change"; $table .="</td></tr>"; } $table .="</table>"; ?> <?php if(isset($_GET['id'])){ $id = $_GET['id']; $opt_val = $_GET['opt']; $sql = "UPDATE test_tb SET my_opt='".$opt_val."'"; mysql_query($sql); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <?php echo $table;?> </body> </html> Pls somebody help me.
  12. I have a table having enum values and now i'm trying to insert and update the values according to the select values. It is not updating . Is is possible to update the values according to the form selection. Here is my code: <select name="task_type" id="task_type" class="chzn-select" style="width:250px"> <option value="0">Select Task Type</option> <option value="1">Controlled</option> <option value="2">Simple</option> <option value="3">With Notification</option> <option value="4">Collabration</option> <option value="5">Periodically</option> <option value="6">Once</option> <option value="7">Note</option> </select> and Here is the way I'm updating in the database; $table = user_tasks; $data = array( 'portal_id' => $portal_id, 'company_id' => $company_id, 'user_id' => $user_id, 'parent_id' => intval($_POST['parent_id']), 'assigned_to' => sanitize($_POST['assigned_to']), 'title' => sanitize($_POST['title']), 'task_type' => sanitize($_POST['task_type']), 'description' => sanitize($_POST['description']), 'status' => sanitize($_POST['status']), 'file_name'=> sanitize($_FILES['file_name']['name']), 'task_end_date' => sanitize($_POST['timetask']), 'repeat' => sanitize($_POST['repitition']), 'date_updated' => date('Y-m-d H:i:s') ); ($this->id) ? $db->update($table, $data, "id='" . (int)$this->id . "'") : $db->insert($table, $data); $message = ($this->id) ? "Task Updated Successfully" : "Task Added Successfully";
  13. I am using three tinyMCE editors in a single form. But it is not showing any $_Request.
×
×
  • 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.