Jump to content

mansuang

Members
  • Posts

    54
  • Joined

  • Last visited

    Never

Everything posted by mansuang

  1. Try [code] $wq=$db->query("SELECT * FROM gangwars where warID='{$_POST[war]}'"); [/code]
  2. [code] ereg_replace("[^0-9]", "", $string); [/code] More information regarding regular expression : http://en.wikipedia.org/wiki/Regular_expression hope it helps
  3. Please show your full code for investigation
  4. Is this help? You can seperate the query string by using "&" [code] <a href="filename.php?city=YourCity&category=YourCategory"> Your Link </a> [/code] Your db query may link this [code] $city = $_GET['city']; $category = $_GET['category']; $sql = " SELECT name,address,city,phone, from _table WHERE city='$city' AND category='$category' order by name"; [/code]
  5. You may need to put " in your "<a href " tag. because if you echo ?id=Image1 [color=red]Name[/color]. "Name" is one of attribute names of "<a ", so you need to put "..." between your link target [code=php:0]Print "<a href=\"./sort.php?id=".$info['b_name']."\">".$info['b_name']."</a> <br>" ;[/code]
  6. [quote author=bulgaria_mitko link=topic=118202.msg482820#msg482820 date=1165860494] now its not displaying anything i write the code again: <p>Моля попълнете следната информация: <form action="php.php" method="post"> Вашето име: <input type="text" name="ime"><br> Възраст: <input type="text" name="godini"><br> Интереси : <select multiple name="interesi[]"> <option value="Интернет">Интернет <option value="Музика">Музика <option value="Кино">Кино <option value="Филателия">Филателия </select> <input type="submit" value="Изпрати!"> </form></p> and php.php: <p> Здравейте, <?php echo $_POST['ime']; ?> , вие сте на <?php echo $_POST['godini']; ?> години! Вашият интерес е свързан с <?php print "<pre>"; print_r  ($_POST['interesi[]']); print "</pre>"; ?> </p> and its not displaying anything [/quote] Try this code in php.php [code] <p> Здравейте, <?php echo $_POST['ime']; ?> , вие сте на <?php echo $_POST['godini']; ?> години! Вашият интерес е свързан с <?php foreach($_POST['interesi'] AS $select){   echo $select."<br>"; } ?> [/code]
  7. my understanding is. you should give the name of iframe tag ex: [code]<iframe name="iframe1">[/code] then put target in form tag ex: [code]<form action="pg1.php" target="iframe1">[/code] hope it helps
  8. You may need loop to display all items. [code] <?php foreach($_POST['interesi'] AS $select){   echo $select."<br>"; } ?> [/code]
  9. 1) & 2) & 3) Modify some code [code] <?php ... ... ... foreach ($_FILES['file']['name'] as $k => $filename) { if ($filename != '')  {   $tmpfile = $_FILES['file']['tmp_name'][$k]; //mansuang: move this code here //if the temp file1 is there copy it to the server if (@is_uploaded_file($tmpfile)) { copy($tmpfile, "return_images/" .$filename); echo "<br>success"; }else { echo "<br>Not Uploaded<br>"; } //mansuang: end of moving the code   }else{   echo "error";   }   } foreach ($_FILES['file']['name'] as $value3) { if(!empty($value3)){ //mansuang:Add "if" statement $pathname = "$value3"; //mansuang:original one-> $pathname .= "$value3"; $mysql = "**********"; mysql_select_db($mysql); $sql = "INSERT INTO `images` (`imagepath`) VALUES ('$pathname');"; mysql_query($sql) or die('Error, insert query failed'); } //mansuang:close "if" statement } echo $pathname; echo $thumbpath; ?> [/code]
  10. For example: When you send email to someone in html format and you want to know when they read your email. You include [code]<img src="http://www.yourdomain.com/notify.php?emailto=someone@domain.com" width=1 height=1 border=0> [/code] in your html email. "notify.php" contains: [code] <?php // The message $message = $_GET['emailto']."opened your email at ".date("Y-m-d H:i:s"); // Send mail('youremail@yourdomain.com', $_GET['emailto'].' opened yoru email', $message); ?> [/code] something like this
  11. Try UPDATE instead of INSERT [code] $query = "UPDATE members SET picture = '$filepath' WHERE user_name='$username'"; [/code] I am not sure this is help or not
  12. [code] $query = "INSERT INTO members (user_name, picture) VALUES ('$username', '$filepath')"; $result = mysql_query($query) or die ("could not add picture."); [/code]
  13. I think your problem come from "content.php" file. Take a look at output html [code] *** *** </div>        <div class="dashborder">           <h4>hello again</h4>           <!-- **** เผื่อมีอะไรดี ๆ ก็จะได้แนะนำตรงนี้**** -->   huhu haha hihi </div>              </div>   <div id="column2">        ไม่สามารถเชื่อมต่อได้ [/code] It means there is something wrong with "content.php" (maybe about the connection to MySQL, i guess) The solution is try to comment out [code=php:0]<?php include('content.php');?>[/code] then check output again.
  14. use javascript [code] <INPUT TYPE="button" onClick="location.href='<?=$_SERVER['HTTP_REFERER']; ?>'"> [/code]
  15. use regular expression link for javascript [url=http://www.phpfreaks.com/javascript_manual/page/regexp.htm]http://www.phpfreaks.com/javascript_manual/page/regexp.htm[/url] link for php [url=http://www.phpfreaks.com/phpmanual/page/ref.regex.html]http://www.phpfreaks.com/phpmanual/page/ref.regex.html[/url]
  16. [quote author=kmk4 link=topic=117673.msg480273#msg480273 date=1165465134] i downloaded the file .htaacess and i add php_flag register_globals on to the end of the file but i get server internal error so what is the correct way to do it this is the content of my .htacess file [code] # -FrontPage- IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti* <Limit GET POST> order deny,allow deny from all allow from all </Limit> <Limit PUT DELETE> order deny,allow deny from all </Limit> AuthName www.mysite.net AuthUserFile /home/mysite/public_html/_vti_pvt/service.pwd AuthGroupFile /home/mysite/public_html/_vti_pvt/service.grp [/code] [/quote] kindly try : [code] # -FrontPage- IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti* <Limit GET POST> order deny,allow deny from all allow from all </Limit> <Limit PUT DELETE> order deny,allow deny from all </Limit> AuthName www.mysite.net AuthUserFile /home/mysite/public_html/_vti_pvt/service.pwd AuthGroupFile /home/mysite/public_html/_vti_pvt/service.grp php_flag register_globals on [/code] If you still get error, your server might not allow override controls.
  17. There is many way to prevent that problem. For exampe: remove [code]if($_GET['page'] < 0){ header("Location: index.php?site=gallery/galleries.php&type=allt&page=0&limit=".$limit); }[/code] then modify something [code] <?php ... ... ... if ($_GET['page']==NULL || $_GET['page']<0){ $start = 0; } else { $start = $_GET['page']; } ... ... ... $previous = $start + $limit; $next = $start - $limit; if($previous<0){ $previous = 0; } echo '<a href="index.php?site=gallery/galleries.php&type=allt&page='.$previous.'&number='.$limit.'">Previous Page[/url] - '; echo '<a href="index.php?site=gallery/galleries.php&type=allt&page='.$next.'&number='.$limit.'">Next Page[/url]'; ?> [/code]
  18. The easiest way to repair your site is use .htaccess to turn "register_globals" to be "on" To do that you will need to create .htaccess file in your site main directory (or the directory that contain yor php script) In you .htaccess should contain the following line. [code] php_flag register_globals on [/code] but remember, turning "register_globals" to "on" is easy but less secure coding.
  19. The HTTP status header line will always be the first sent to the client. So, try to move [code]if($_GET['page'] < 0){ header("Location: index.php?site=gallery/galleries.php&type=allt&page=0&limit=".$limit); } [/code] To the first line of your code cheer!
  20. I think your problem is around the link for "Previous" and "Next" echo '<a href="index.php?site=gallery/galleries.php&type=allt&[color=red]page[/color]='.$previous.'[color=red]&number='.$limit.'[/color]">Previous Page</a> - '; echo '<a href="index.php?site=gallery/galleries.php&type=allt&[color=red]page[/color]='.$next.'[color=red]&number='.$limit.'[/color]">Next Page</a>';
  21. You can write both include "http://www.serverstats.com/monitor.php?mon=".$server; or include ("http://www.serverstats.com/monitor.php?mon=".$server) ;
  22. Try [code] include("../../includes/variables.php"); [/code] "../" means one parent directory. Mansuang
×
×
  • 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.