User Profile

Collapse

Profile Sidebar

Collapse
abhishekmiet
abhishekmiet
Last Activity: Apr 23 '11, 01:09 AM
Joined: Mar 27 '11
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • This worked well on mysql V5.5.8
    Code:
    <?php
    	if(isset($_POST['name'])){
    		$name=$_POST['name'];
    		$dbc=mysqli_connect('localhost','root','','test') or die("Error connecting database...");
    		$query="INSERT INTO test (name) VALUES ('$name')";
    		$result=mysqli_query($dbc,$query) or die("Error querying database.$query");
    		echo "Successfully inserted.";
    	}
    ...
    See more | Go to post

    Leave a comment:


  • You may use require_once('/folder_name/file_name.php') ;
    or require_once('f ilename.php') if the file to be included
    is in the same folder...
    May this will help you........
    See more | Go to post

    Leave a comment:


  • abhishekmiet
    replied to Website showing wrong time
    in PHP
    but without changing your php.ini in such cases in which you don't have access to php.ini you may use the script described by me above.......
    See more | Go to post

    Leave a comment:


  • abhishekmiet
    replied to Website showing wrong time
    in PHP
    U may include this line before you use any date related function.....
    Code:
    <?php
         date_default_timezone_set('Australia/Hobart');
    ?>
    hope it will help..good luck.....
    See more | Go to post

    Leave a comment:


  • abhishekmiet
    replied to exec() doesnot work??
    in PHP
    You may check your php.ini file , if their exec is permitted or not....
    See more | Go to post

    Leave a comment:


  • abhishekmiet
    replied to PHP Variable Troubles - $_GET
    in PHP
    I hope the following bunch of code will help you...

    Code:
    <?php
    if(!isset($_GET['page'])){
     $page='page1';
    }
    else{
    $page=$_GET['page'];
    }
    ?>
    See more | Go to post
    Last edited by Dormilich; Mar 29 '11, 05:47 AM. Reason: please use [CODE] [/CODE] tags when posting code

    Leave a comment:


  • Ensure that you had started session before printing a session variable and that session variable had been registered.
    e.g.

    Code:
    <?php
    [B]session_start();[/B]
    
    if([B]isset($_SESSION['id'])[/B]){
    ?>
    <input name="pm_sender_id" id="pm_sender_id" type="hidden" value="<?php echo $_SESSION['id']; ?>" />
    <?php
    }
    else{
    ?>
    <input name="pm_sender_id"
    ...
    See more | Go to post
    Last edited by Dormilich; Mar 29 '11, 05:47 AM. Reason: please use [CODE] [/CODE] tags when posting code

    Leave a comment:


  • abhishekmiet
    replied to PHP MySQL JavaScript innerHTML
    in PHP
    You may use AJAX for adding data to webpage after it has been loaded.
    First create a XMLHttp request object using javascript,whic h will be sended to a .php script at server side and the response from php script will be parsed through javascript without any page refresh.
    A simple tutorial on AJAX may be found at http://www.w3schools.com/ajax/
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...