Jump to content

Chetan

Members
  • Posts

    162
  • Joined

  • Last visited

    Never

Everything posted by Chetan

  1. Well, you can indeed ask after how many days in the admin panel but not on what date. here is the way. 1. When one accesses a PHP script on the site you check the time() and compare it with the time stored (you need to have a column named time, where you store the time) 2. Compare the time of both and you can now know how many seconds have passed since the date it was put in. 3. If it is more than the time specified in expiry_date(now you also need this feild to have how many seconds after it has to be expired) 4. Add the time in DB and the expiry and compare it with the time.
  2. 1. Uh because, if its not an array you would need to think of the names again and again which is not quite impossible. 2. (think about php.net) eval() function takes some php code and executes it. for egample you have some Php code in mysql db you can retreive it and execute it using eval() 3. So you want to put this stuff in not only 1 table but 2, ok. Use this code [code] <?php // MySQL $conn=mysql_connect('localhost', 'root', ''); $db  =mysql_select_database('database'); $table=array('table1', 'table2', 'table3'); // Declare feilds and data $fields = array('field1','field2','field3'); $data = array($data1,$data2,$data3); // The script $num2= count($table); $num = count($field); for($u=0; $u<$num2; $u++) { for($i=0; $i<$num; $i++) { $exec = '$sql = \'INSERT INTO $table['.$u.']($field['.$i.']) values($data['.$i.']);'; // For debugging, you may uncomment this code // echo($exec); eval($exec); mysql_query($sql); } } ?> [/code] In this case we are repeating the code by counting the number of tables. The names of tables are in $table as array
  3. Its not a text box, and I only wanted to chang my Display Name
  4. I think you should have given me the page which joins dese 2 pages in frames, i dint want the main frame
  5. Gives me 0 if empty, it dosent give me 1. And if it is a variable then ofcource it gives 1.
  6. I think it was olved but still have it [code] <?php // MySQL $conn=mysql_connect('localhost', 'root', ''); $db   =mysql_select_database('database'); $table='table'; // Declare feilds and data $fields = array('field1','field2','field3'); $data = array($data1,$data2,$data3); // The script $num = count($field); for($i=0; $i<$num; $i++) { $exec = '$sql = \'INSERT INTO '. $table.'($field['.$i.']) values($data['.$i.']);'; // For debugging, you may uncomment this code // echo($exec); eval($exec); mysql_query($sql); } ?> [/code] This script is actually commplex but still Ill tell you what you have to do in $conn set your host, user and pass $db set your database $table set the table for data and feilds you can use a script but make sure you you set $feilds to the feilds array and $data to the data The for() is not that difficult but I prefer you dont touch it. You can put it anywhere in your script but make sure $table is set and $feilds and $data arrys are set. I hope this is what you want
  7. I wanna change my name, please?
  8. Its possible, dont hav d code so if you use GD you know where to put the GET vars
  9. Display that image somewhere and if you want to hide that image use CSS. I dont think its because the time. You can remove the line which checks if images are loaded in your function. Give a function which you use and I can just modify it. And since this is JS not PHP it shud be in d JS board
  10. Wat i mean to say is-- Have a column named 'time'. The script which you use to write to the table should put time() in there. The script where you delete, checks the time and subtracts sum time and checks if it is greater than the time stored and deletes dose. ~~RG
  11. Yes, you need a column in the table such as time, and when you enter data you pu time() in it. and delete it everytime after check the time()
  12. Well that way you have a whole database of chat systems at hotscripts.
  13. You are saying there is information in one table about X and there is another table with info for X so you want to do something to those specific X column. Well thats all I understand so, srry I cant help if I dun understand... ~.~
  14. I am using it on a PC. And mercury works on windows. Since you use a router you would have to setup your Virtual Server settings, ask me here if you want to know how to do it. Your speed is gud so it would work good to. And for DNS use http://freedns.afraid.org like me. You dont need a domain but if you want you can buy one from http://www.register.com But freedns service has domains like us.to which look like professional domains to some ppl but it is better you use a domain for gud, prefessional and a huge site
  15. Ok understood, quick thing us a where clause eg: I cant understand wat u say so eg retreive id from table 1 update where id=wat got from table 1
  16. Here is what I use. A basic idea [b]The real page.[/b] [b]--index.html[/b] 1. Has a banner 2. Has two <iframes> the top one stretchin 100% w and 60% h the one below 100% w and 20% h 3. First iframes=dis.php 4. Second iframe=add.php [b]Display page[/b] [b]--dis.php[/b] 1. Refreshes every 5 secs 2. Reads a file chat.txt 3. Formats it and displayss the contents [b]Add page[/b] [b]--add.php[/b] 1. Has a name feild on top, which has the contents of the cookie name. 2. Has a message box. 3. Once submitted it sets a cookie name with the value of name. 4. writes to file chat.txt, the name and message. This helps a lot for one can write while still being able to see whats going on. If you had the same page having to refresh which has the display and add thing, it would not work good. You can also add smily support which is not @ all difficult [b]Note: This is an example of a PHP chat.[/b]
  17. U want to select data from 1 table and insert it into the other? first select the data and use foreach to keep executing the query using mysql_query
  18. Actually I would use it too, maybe I can learn stuff.
  19. I host myself, so here is what all I have got. Apche 2.58 PHP 5 MySQL Mercury Mail Server Norton Security 256kb/s Internet, whic is ok but, more is preffered 256mb ram Dynamic DNS with freedns.afraid.org D-Link Router
  20. I never learnt GD because of that, I only copy - paste from php.net. And I never even needed it, so I cant help you.
  21. I think there is a <base> target in the starting or i cant get wat you say, would you please give us the source of admin index and the code of the left frame.
  22. If you dont get errors and someone else hosts you, put this line in the top to see if you get errors [code=php:0] <?php ini_set('display_errors', '1'); error_reporting(E_ALL); ?> [/code] and then use If and else statement to check if there were problems. This is basically with your SMTP
  23. That is really gonna take a lot of coding if it is because of the 1st condition. Its important to see the right frames name, you dint specify it so you look for its name <frame name="x"> So I am rightnow considering it x [b]1. Checking how its done[/b] [b]Condition #1[/b] Does the panel have a line like <base target="x"> then you need to code a lot. Remove the line. And put [code]target="x"[/code] in every <a> tag. Goto step 2. [b]Condition #2[/b] In case it is coded with all its links with [code]target="x"[/code] you goto the next step [b]2. Changing[/b] Now its quite easy just remove the line [code]target="x"[/code] from the links you dont want to open in the right frame
  24. Try googly, i mean googling 'GD Programming in PHP' I normally get  what I want on Googly.
×
×
  • 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.