Jump to content

ejoe

Members
  • Content Count

    482
  • Joined

  • Last visited

Posts posted by ejoe


  1. Hi,

    It could be that mysql_pconnect is disabled. If mysql_connect doesn't

    work either, you most definitely need mysql support built in your php

    for this to work.

    Try this....

    In your php.ini:

    [MySQL]

    ; Allow or prevent persistent links.

    mysql.allow_persistent = On

    This will set to 'on' for mysql.allow_persistent, ok but is mysql

    enabled.

    And what about your configuration Command..

    is your configure command looks something like that ?

    './configure' '--with-

    mysql=/usr/local/mysql' ............................................

    If you don't have --with-mysql it means that you cannot use mysql

    functions, so compil again PHP

    with this option.

    ni hosting windows ker?


  2. dlm php la, paling senang tgk cth dibawah

    //mula2 insert to database

    $result = mysql_query ("INSERT INTO `table1` (`ID` , `name`) VALUES ('$ID', '$_POST[name]')");

    //pastu select ID yg latest ko masukkan td

    $result = mysql_query("select * from table1 where ORDER BY ID DESC LIMIT 1");

    $row = mysql_fetch_array($result);

    $ID2 = $row['ID'];

    //dah dpt id tu ko masukkan dlm table lain la plak

    $result = mysql_query ("INSERT INTO `table2` (`ID` , `name`) VALUES ('$ID2', '$_POST[name]')");

    p/s awas! koding kat atas tu aku tak test..so faham2 la huhu


  3. sedikit info ttg register_global

    Register Global(register_globals) adalah salah satu konfigurasi yg terdapat dlm php. Konfigurasi register_globals merupakan ciri di dalam PHP di mana kesemua pembolehubah global boleh dicapai secara automatik sekiranya register_globals di pasang (on). Namun pencapaian pembolehubah secara global boleh menyebabkan risiko keselamatan. Konfigurasi register_globals boleh diubah di dalam fail php.ini. PHP 4.2.0 dan keatas secara defaultnya menutup register_globals untuk tujuan keselamatan.

    more info

    http://www.ejoe.net/forum/tutorial_view.ph...e=php&id=76

×
×
  • Create New...