Jump to content

chand.sethi77

Members
  • Content Count

    75
  • Joined

  • Last visited

Community Reputation

0 Neutral

About chand.sethi77

  • Rank
    Newbie
  • Birthday 08/27/1995

Contact Methods

  • Website URL
    http://www.chandsethi.tk

Profile Information

  • Location
    Sirsa, Haryana, India
  1. I know how to install IIS but if need i unistall PHP (Wamp) first? and install it after installing IIS?I wish i could make different user accounts for both
  2. Using ASP and PHP together on windows for localhost?I am using Windows 7. I have installed WAMP server to use php and it works well when I open http://localhost I also want to try ASP. I know how to enable it. But when I do, I lost my PHP server.I know I have to do something like 127.0.0.1:7777 but how to do that? My ISP doesn't allow port forwarding and web hosting.Is it possible to CREATE a new user account and install + use asp there whereas use php on default user?THanks!
  3. I think its a problem with somewhere near if (isset$cat..... )print_r ($result) shows nothing
  4. This is my code : <?php$connect = mysql_connect("localhost", "root", ""); if (!$connect) {die ("Error." . mysql_error() ); }$db_select = mysql_select_db("grabitup", $connect); if (!$db_select) {die ("Error." . mysql_error() ); }if (isset($_GET['cat'])) { $cat = $_GET['cat']; } else { $cat = "<a href='walkth.php?refid=walk'>Click here to go to the walkthrough"; }$query = mysql_query("SELECT * FROM posts WHERE category = $cat"); $result = mysql_fetch_array($query); ?><html> <head> <title> Grab it up </title> <style type="text/css"> body {height:
  5. I have a category field in my database and the user inserts it using <select> and <option> which I provide him/her on a page called post.phpI want to make a site map kind of page where user will get links to the categories.Like : <a href="category.php?cat=arts> Arts </a> <br /><a href="category.php?cat=creativity> Creativity </a> But I don't want to write it again and again because I have quite large number of categories and I want to use PHP.I am up to here : <?php $connect = mysql_connect ("localhost", "root", ""); if (!$connect) { die ("Err
  6. I have that id in my database as a field which is primary key, not null and auto increment
  7. Okay I tried to put my errors in different posts but i think it is better to post it together. I know it may take time to read the whole code.. but at least try. I have two files = post and topicPOST.PHP <?php require("func.php"); ?><?php$connect = mysql_connect("localhost", "root", "");if (!$connect){ die ("Error! " . mysql_error() ); }$db_select = mysql_select_db("getupdate", $connect);if (!$db_select){ die ("Error! " . mysql_error() ); }$query = mysql_query("SELECT * FROM updates");if (!$query) {die ("Error" . mysql_error());}$page_id = mysql_fetch_array($query); if (!$page_id)
  8. Tell me the correct syntax for INSERT INTO updatesMy code is as follows: <?php$name = $_POST['name'];$email = $_POST['email'];$subject = $_POST['subject'];$catagory = $_POST['catagory'];$content = $_POST['content'];?><?php$insert = mysql_query("INSERT INTO updates (name, email, subject, catagory, content) VALUES($name, $email, $subject, $catagory, $content) ");if (!$insert) { die ("Error in inserting your query. " . mysql_error()); }?> The error is Error in inserting your query. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server ve
  9. Thanks both of you for your service. I got silly mistake
  10. I have a form which is working fine. When some one inputs anything, that smoothly goes in my database without any error.The thing I want is , when ever someone inserts something, the ID of that post (primary key and auto increment) should come in the link after topic.php?page=ID_OF_PAGE (here topic is value of action attribute of form tag.In simple words I want to show the ID of the post/topic (in my database) to the address bar of user after topic.php?page=I have very little idea about that. This is what I am up to: $sql = mysql_query("SELECT * FROM updates"); // Plus all that if (!$sql.....
  11. Got that. Removed $connect and all is well now. Thanks Sir and Birbal of course.
  12. Everything is settled except Catagory (I know this is misspelled but I checked, it is same everywhere and I don't wanna change it to category)It says that Catagory is undefined index $f = $_POST['catagory']; And on the source page, it is like this: <?php $category = array("arts", "entertainment", "internet", "facebook", "health"); foreach ($category as $comp) { echo "<option value='catagory'> $comp </option>"; } ?>
  13. Okay, when inserting values, do I need to use ' ' when I already assigned them as variables?Like $name=$_POST['name']in values what should I do VALUES ($name); OR VALUES ('$name')
×
×
  • Create New...