Jump to content

Chetan

Members
  • Posts

    162
  • Joined

  • Last visited

    Never

Everything posted by Chetan

  1. desithugg, that name makes me laugh, thats sumthin in my lang. Pokemon RPG well youll hav 2 make it too gud, there are many, can't see your code, its huge, make sure you dun use <pre> tags.
  2. You guys, simple he uses variables in ''  $insertfundquery = 'INSERT INTO longterm( fundname,'.           'starrating, firstyear, thirdyear,'.           'fifthyear, tenthyear, fifthteenyear)'.           'VALUES ( "$fundname", "$starrating",'.           '"$firstyear", "$thirdyear", "$fifthyear",'.           '"$tenthyear", "$fifthteenyear")'; Now you know wat to do Thats ofcourse not all but still a little or else you had come up with this error later
  3. Maybe your code has some endless loop and max execution is 3 days. With the server all I can say
  4. Thats what i mean? I only need an Admin to change it
  5. would be better if you use $_SERVER['HTTP_REFERER']; and thats headers part not PHP
  6. And i dont think that stuff would be free. maybe someday MS uses bbcode to format stuff but till then hope
  7. also index.html should get removed or else old stuff
  8. Well unless you also want to parse png files in PHP here is how you do it. The place in apaches conf where you set which extensions should be parsed in PHP put png, jpg, gif and write image code in png to return a png file which can be saved. So you see you cant do it unless you wanna parse image files which only the server admin can do which i guess is not you
  9. No unless it is being changed somewhere else (locally or another script)
  10. No it is not because of the extension being .php, And preferabely do not use WYSIWYG for sometimes WYSIWYG create problems for PHP ppl and delete the index.php and use dreamweaver or something to edit it locally and then upload it again
  11. XML as he specifiedin his post >.>
  12. You would have 2 use the function twice~~ and if you are trying to print the value please dont forget like noobs that you need to use echo if you use return, it just does not echo it.
  13. I think you know you cant append files with it, ull hav 2 code it so you get everything exept the line to append it
  14. For better performance use [code] $marquee.= $r['message']. '<a href="'.$r['eml'].'">'. $r['author']. '[/url]'"; [/code] @Jacka = You forgot $r[message] @runnerjp = Learn about the difference of "" '' and where to use them in variables
  15. file.txt [code] Hello Mello Tello [/CODE] file.php [code] <?php $file=file('file.txt'); echo($file['1']); // Hello echo($file['2']); // Mello echo($file['3']); // Tello ?> [/code]
  16. The for loops change em [code] for($u=0; $u<=$num2; $u++) { $flds=''; $dat=''; for($i=0; $i<=$num; $i++) { $flds.='$fields['.$i'.]'; $dat.='$data['.$i.']'; } $exec = '$sql = \'INSERT INTO $table['.$u.']($flds) values($dat]);'; // For debugging, you may uncomment this code // echo($exec); eval($exec); mysql_query($sql); } [/code]
  17. Sorry for big delay, ill just do what you want
  18. Not always, use this [code] <?php ini_set('display_errors', '1'); error_reporting(E_ALL); ?> [/code]
  19. Ya but when configuring you use it. because having a router means, being on a lan and we are telling it which machine it should forward the request to.
  20. You know the line number, then use file()
  21. Sorry my internet got bad, here is what i had to post. The script which inserts data takes post variable- job [code] <?php // Considering, already connected to MySQL $job = $_POST['job']; $time = time(); $expiry = time() + 60*60*24*90; $sql = 'INSERT INTO jobs(job, time, expiry_date, expire) values(\''.$job.'\', \''.$time.'\', \''.$expiry.'\', \'1\')'; mysql_query($sql); ?> [/code] Now the page where you delete, include this in any page so this automaically expires extra jobs. [code] <?php // Considering connected to MySQL and have already put the job in // $job, time in $time and expiry_date in $expiry $time2 = time() - $expiry; $sql = 'UPDATE jobs SET expire = \'0\' WHERE time>'.$time2; mysql_query($sql); ?> [/code] Hope you understand it and it works
  22. Well i dont understand any of that. What i understand is that you want to use for inside an array, put the code in a variable and eval() it
  23. FreeDNS does not have a program but you can use UPIP to change dynamic DNS. Norton Security well that does not relate to server but the thing is one cannot put virus files on your compu. I dint get much errors on freedns but that was sum weeks ago. And for hosting the site you do not need much. Port Forwarding is same as Virtual Server, here is what you should do. 1. If you have a shortcut on desktop to your setting page for your routor go there or if you were specified with an ip address for that use it. 2. Now goto Advanced tab. 3. Virtual host. 4. Goto start->run and type winipcfg(9x ME) ipconfig(WinXP) 5. Get the ip address from there. 6. In the page we had opened add a server which forwards port 80 to port 80 of your machine: The type: TCP Port start: 80 Port End: 80 Port map: 80 IP: The ip we had found We need one more entry The type: TCP Port start: 443 Port End: 443 Port map: 443 IP: The ip we had found Thats not all we need you have to make sure your settings page is not on port 80. in case it is: 1. Tools tab 2. Admin 3. Change port to 8080 or what ever you want. You would have to use localhost to access your server from your computer and putting your lan ip which we got from ipconfig would work but using the external ip would not work. But the external ip works on any other computer on internet, to get the external ip goto: http://www.knowip.com
  24. [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.']($fields['.$i.']) values($data['.$i.']);'; // For debugging, you may uncomment this code // echo($exec); eval($exec); mysql_query($sql); } } ?> [/code] In case this dosent work uncomment the commented debugging line
×
×
  • 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.