User Profile

Collapse

Profile Sidebar

Collapse
abertay
abertay
Last Activity: Sep 25 '07, 09:11 AM
Joined: Jul 19 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • would you mind if i ask you post your code here...

    That way i can help you more quickly...
    See more | Go to post

    Leave a comment:


  • Need help in passing a javascript variable into a hyperlink

    Hi friends...I need our help.I'm stuck with this code...

    can some one tell me how can pass a javascript variable into hyperlink along with a php varaible?

    Here is my code..
    [code=html]
    <html>
    <head>
    <script type="text/javascript">
    function favBrowser()
    {
    var mylist=document .getElementById ("myList")
    document.getEle mentById("favor ite").value=myl ist.options[mylist.selected Index].text...
    See more | Go to post

  • abertay
    replied to Need Help For Last Visit
    in PHP
    You can do that with the help of Cookies....
    See more | Go to post

    Leave a comment:


  • abertay
    replied to Echoing form input on a separate page.
    in PHP
    Hi buddy..

    here is the sample code that will search and returns results from database based on your input.

    [PHP]
    <?php
    if($_POST['submit'])
    {
    $dbconnect=mysq l_connect("host name","rootname ","password ");
    mysql_select_db ("database_name ");
    $sql="select * from TABLE_NAME where COLOUMN_NAME='$ _POST[text]'";
    $query=mysql_qu ery($sql,$dbcon nect);...
    See more | Go to post

    Leave a comment:


  • Remove the double qoutes in your mysql_connect & mysql_select_db query.
    Because $host="localhos t" so you dont need them again

    Code:
    mysql_connect($host,$root,$password);
    mysql_select_db($dbname);
    ...
    See more | Go to post

    Leave a comment:


  • abertay
    replied to Discussion about updationof records in php
    in PHP
    Hi punitshrivastav a,
    i've gone through your code....

    replace this query
    $dbconnection=m ysql_connect($h ost,$username,$ password) or die("cannot connect");

    and also
    $result = mysql_query($sq ls,$dbconnectio n);

    if you still can't get the desired result try to echo every sql statement....
    See more | Go to post

    Leave a comment:


  • abertay
    replied to What is the meaning of @ in @file
    in PHP
    hi pal,

    @ is an error suppression operator.Genera lly used to display our own
    (User specified) error messages.

    Here is the sample code ....

    // Connect to the database server
    $dbcnx = @mysql_connect( "localhost" , "root", "");

    if(!$dbcnx)
    {
    echo "<P>Unable to connect to the database server at this time.</P>";...
    See more | Go to post

    Leave a comment:


  • abertay
    replied to Verifying user inputs
    in PHP
    [CODE=php]
    you can make use of foreach loop


    foreach($_POST as $value)
    {
    if (!$_POST[$value])
    {
    $err .= "$value is a required field <br>";
    }
    }

    if ($err)
    {
    echo $err;
    }
    else
    {
    // Continue with script
    }
    [/CODE]
    See more | Go to post
    Last edited by ak1dnar; Jul 19 '07, 12:55 PM. Reason: Added [Code=php] tags

    Leave a comment:


  • abertay
    replied to About Submit Button
    in PHP
    simple...
    put your function in an if block.....

    something like

    [CODE=php]
    if($_POST['name_of_submit _button '])
    {

    and call your function here......
    handle_error($s omething,$somet hing)

    }
    [/CODE]
    See more | Go to post
    Last edited by ak1dnar; Jul 19 '07, 01:30 PM. Reason: Added [code] tags

    Leave a comment:


  • abertay
    started a topic now() integer format

    now() integer format

    I've inserted a record into mysql db using now() function value.

    just like...

    insert into TABLE_NAME(date ,name,age)value s(now(),'Naresh ','24')

    when tried to echo the date filed value on the local system,it gives me 2007-06-06 13:14:16.

    But on the live system it gives me as 20070606131416( I dont want this format).
    It's weird and i can't understand what the problem.

    And...
    See more | Go to post
No activity results to display
Show More
Working...