Jump to content

irkevin

Members
  • Posts

    295
  • Joined

  • Last visited

About irkevin

  • Birthday 08/02/1985

Contact Methods

  • MSN
    irkevin@hotmail.com
  • Website URL
    http://www.mu-anime.com

Profile Information

  • Gender
    Male
  • Location
    Mauritius

irkevin's Achievements

Member

Member (2/5)

0

Reputation

  1. Hi phpfreaks community, My name is ian and I would like to offer my services as a PHP developer. I have 9+ years of experience in PHP/MySQL, basically the WEB in itself + a strong knowledge in Symfony framework and other related framework. I work with HTML, CSS, JavaScript, jQuery, node.js, angular.js, MySQL, PHP, Symfony, CodeIgniter. Feel free to send me an email for more information: irkevin@hotmail.com Have a good day/evening Regards, Ian
  2. You mean you let the user alter you database tables? Maybe and INSERT INSERT INTO tableName(your_fields) VALUES(your_values)
  3. Hi, I have a function that display an infinite list of categories.. So far this work fine.. But now I want to display only the second level of every main category and not the subs.. Consider this: Main1 Main2 Main3 Main4 car1 Bike1 watch1 Game1 SubSub1 SubSub1 SubSub1 SubSub1 car2 Bike2 watch2 Game1 SubSub2 SubSub2 SubSub2 SubSub2 What I want to achieve is, display on Car1 Car2 Bike1 Bike2 Watch1 Watch2 Game1 Game2 Here is the code I have so far: function get_cat() { db_connect(); $sql = "SELECT * FROM category"; $result = mysql_query($sql); if(mysql_num_rows($result) > 0){ while($row = mysql_fetch_array($result)){ $menu_array[$row['id']] = array( 'name' => $row['name'], 'parent' => $row['parent_id'], 'id' => $row['id'] ); } return $menu_array; } } function generatemenu($parent,$array){ $has_childs = false; //this prevents printing 'ul' if we don't have subcategories for this category //use global array variable instead of a local variable to lower stack memory requierment foreach($array as $key => $value) { if ($value['parent'] == $parent){ $has_childs = true; if($has_childs == true){ if($value['parent'] == 0) echo '<ul class="main">'; else echo '<ul class="subs">'; } //if this is the first child print '<ul>' if($value['parent'] == 0) echo '<li><a href="index.php?category='.$value['id'].'">' . $value['name'] . '</a>'; else echo '<li><a href="index.php?category='.$value['id'].'">' . $value['name'] . '</a>'; generatemenu($key ,$array); //call function again to generate nested list for subcategories belonging to this category echo '</li>'; if($has_childs == true) echo '</ul>'; } } } Can someone help?
  4. I need to set a cookie, and later update it. Meaning, the cookie needs to retain its current value, plus add new values to it from GET variable data. Nobody to help?
  5. Hi here is my problem, i have a link like : index.php?id=1 When user click on it, a cookie array is set with a value of 1 when user clicks on another link with an id of 2, the same cookie is set with another value of 2, at the end , the cookie should read: array( [0] => 1 [1] => 2) Can someone please explain how to do this? im struggling :S
  6. You can try something like this: <?php $dbHost = $dbUser = $dbPass = $dbDatabase = $search = $_POST['search']; if ($search) // perform search only if a string was entered. { $con = mysql_connect($dbHost, $dbUser, $dbPass) or die("Failed to connect to MySQL Server. Error: " . mysql_error()); mysql_select_db($dbDatabase) or die("Failed to connect to database {$dbDatabase}. Error: " . mysql_error()); $query = "SELECT Appr_Value.Appr_ID as id, Appr_Value.Account, Asmnt_Parcel.OwnersName, Asmnt_Situs.Situs FROM Appr_Value INNER JOIN Asmnt_Parcel ON Appr_Value.Account=Asmnt_Parcel.Account INNER JOIN Asmnt_Situs ON Appr_Value.Account=Asmnt_Situs.Account WHERE Appr_Value.Account LIKE '{$search}' ORDER BY Appr_Value.Account ASC"; $result = mysql_query($query, $con) or die(mysql_error().": $query"); if ($result) { echo "Results:<br><br>"; echo "<table width=90% align=center border=1><tr> <td align=center bgcolor=#4A6B3F>Account</td> <td align=center bgcolor=#4A6B3F>Owners Name</td> <td align=center bgcolor=#4A6B3F>Situs</td> </tr>"; while ($r = mysql_fetch_array($result)) { // Begin while $act = $r["Account"]; $name = $r["OwnersName"]; $situs = $r["Situs"]; echo "<tr> <td><a href='formresults.php?id=".$r['id']."'>$act</td> <td>$name</td> <td>$situs</td> </tr>"; } // end while echo "</table>"; } else { echo "Sorry, please try your search again."; } } else { echo "Start your search"; } ?> Now when user clicks on the link, it takes you to a page similar to this http://www.yourdomain.com/formresults.php?id=1 On formresults.php, make a query like this: $query = "SELECT Appr_Value.Appr_ID as id, Appr_Value.Account, Asmnt_Parcel.OwnersName, Asmnt_Situs.Situs FROM Appr_Value INNER JOIN Asmnt_Parcel ON Appr_Value.Account=Asmnt_Parcel.Account INNER JOIN Asmnt_Situs ON Appr_Value.Account=Asmnt_Situs.Account WHERE Appr_Value.Account LIKE '{$search}' AND Appr_value.Appr_ID = '".mysql_real_escape_string($_GET['id'])."' ORDER BY Appr_Value.Account ASC";
  7. Well, as a start, I don't really understand your query. What's this: build_device_test.$'Auto_id' Please clarify. If you could show how your table are set up, that would be a good place to start!
  8. In your select statement, you need to select and ID as well, that's what you need. How is your table set up?
  9. Haha, i find myself several time in this situation xD .. You're welcome
  10. Maybe like this: <?php echo 'welcome '. $name.'<br />'; echo "<a href='women/mygirls/index.html'>logout</a>"; ?>
  11. Try visiting this link I got a similar problem also. Which was fixed by the code in this topic http://www.phpfreaks.com/forums/index.php/topic,154528.msg668929.html#msg668929
  12. Try this, <?php $conn = mysql_connect("machine", "", "") or die("Could not connect : " . mysql_error()); mysql_select_db("my_db", $conn) or die("Could not select database"); $Auto_id = $_GET['Auto_id']; // this shows in url as 1,2,3 is my auto_inc field in database $test = "SELECT * FROM build WHERE build_id = '$Auto_id'"; $result = mysql_query($test); while($row = mysql_fetch_array($result)){ $version = $row['version']; } echo $version; ?> YOu need to iterate over the data using the while loop. Try it and let me know
  13. Basically you will need to look in $_FILES, is_uploaded_file() and move_uploaded_file(), once uploaded, get the URL of the image, or maybe just the image name, and insert it in the Database.
  14. Countrygirl is trying to get specific result based on the current result. I believe she should query it by the ID of the current result to fetch all the data! Can you post your code?
×
×
  • 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.