Jump to content

killervastu

Members
  • Posts

    36
  • Joined

  • Last visited

    Never

Everything posted by killervastu

  1. Do any one have an Idea on how to transmit xml or json from one site to another with php4......... any help please.. Thanks in advance
  2. [sOLVED] Thanks man it made my work. But what if i want to do that type of redirection.
  3. so you are saying that i should also make a include page of the Default page and check it for the status??
  4. Hello everyone, I am creating a site that has two modes 1.Default 2.under construction I use database to see weather the site is under construction or not. The template of under construction is different and is stored in a another directory eg: site url: www.my.com under construction page: www.my.com/uc now i want that when the database is selected for under construction the URL should show www.my.com not www.my.com/uc Please help me with this. I tried to redirect with header(location: '.......'); but in the URL it shows www.my.com/uc Thanks.
  5. hey pm me your mail id i will send you the complete code
  6. Which one is best for starter 1>zend framework 2>codeigniter
  7. while ($row = mysql_fetch_array($get_user_targets)){ this loop is executing twice. check for the database or limit your result to 1
  8. You can do it like this also if you wish if you feel not to use session_register() use the above post's script
  9. when the username and password is correct use this in login.php if username and password match then $sql = mysql_query("SELECT * FROM yourtable WHERE uniqueid =".$username." AND password ='".$password."'" ,$db) or die(mysql_error()); $row = mysql_fetch_array($sql) or die(mysql_error()); $usernamec = $row['uniqueid']; $name = $row['name']; $_SESSION['uniqueid'] = $usernamec; $_SESSION['logged'] = 1; $_SESSION['name'] = $name; now in member .php use this <?php session_start(); if(!isset($_SESSION['logged']) || $_SESSION['logged'] != 1) { header('Refresh: 5; URL=login.php?redirect='. $_SERVER['PHP_SELF']); echo '<p>You will be Redirected to login page within 5 sec.</p>'; echo '<p> IF the browser Dose not redirect <a href="login.php?redirect='. $_SERVER['PHP_SELF'] . '">Click here</a></p>'; die(); } ?> instead of this <? session_start(); if(!session_is_registered(myusername)){ header("location:login.html"); } ?> now you can easily display the name using echo 'Welcome '.$_SESSION['name'];
  10. How is the duplicate result shown can you please show
  11. The way to Register session <?php // Use of session_register() is deprecated $barney = "A big purple dinosaur."; session_register("barney"); // Use of $_SESSION is preferred, as of PHP 4.1.0 $_SESSION["zim"] = "An invader from another planet."; // The old way was to use $HTTP_SESSION_VARS $HTTP_SESSION_VARS["spongebob"] = "He's got square pants."; ?> Now use sql query like $query = 'SELECT username,password,realname FROM yourtable where username ='.$_POST['username']; //if username is used for loggingin $result = mysql_query($query , $db); $row = mysql_fetch_assoc($result); $us = $row['username']; $pa = $row['password']; $rn = $row['realname']; Now use these variables to register as shown above. Hope this would help if not i am here i will explain more
  12. what do you want to register in the session
  13. Ya this is too working and thanks for the reply
  14. You can fire a query and then store your desired thing in a variable and then you can use session_register();
  15. it not $user_id its only the text to display i founded a way in a book echo $ht = <<<a //html code here a;
  16. try this if ($_SESSION['collection'] == "dropoff") { echo "Please drop it off with us"; } elseif ($_SESSION['collection'] == "collect") { echo "Please collect it from me"; } else { echo "Please ship it to you"; }
  17. <span class="hotspot" onmouseover="tooltip.show('User ID :');" onmouseout="tooltip.hide();"> i want to know how to echo this above code
  18. you can use a filed as emailsubscribed for that as enum('0','1') and if subscribed make it 1 now check if the user is subscribed or not if yes then redirect it to your desired location and same with not subscribed.
  19. :confused:can any one please guide me through this. i want to calculate binary income like FOR 1 ST PAIR 1:2 OR 2:1 1ST PAIR 1:2 OR 2:1 1:1 UNLIMITED DEPTH WEEKLY CAPPING 30 PAIR i have created a binary tree and i am also able to display it. but don't know how to make pairs and implement that,and provide an income. i really need this and it is urgent, any help will be of great value for me, this is for my college project, actually i am a not so good at algorithms. thanks. [attachment deleted by admin]
  20. suppose,if i am having a forum in login.php why cant i submit it to itself like <form name="form1" action="login.php"> whats the difference between them the one mentioned in above post and the one mentioned in this post
  21. sorry appending the above, if($var != '') { function($var); } else { function($var= $_session['id']) }
  22. suppose if i am passing for the first time in source node the $_session['id'] then how will i change the value passed in the function on clicking will this work function ($var = $_session['id']) { code }
  23. Thanks for reply but, will it work if it should have to load the same page i want to display 3 levels of a binary tree now if i click on the last node then the last node should take the position of the source node and should act like it i.e. display all the nodes below the clicked node up-to 3 levels again.
  24. Hey guys, I want to pass the unique id of a node to a function when that image is clicked. Actually i am a newbee in php so don't know what to search about or where to look for it,but find this place and you all guys so helpful so i am asking for a guide here :-\
×
×
  • 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.