Jump to content

joshi_v

Members
  • Posts

    168
  • Joined

  • Last visited

    Never

Everything posted by joshi_v

  1. That will depend on your script! Better to provide script!
  2. Replace it with value="$pn.$i+1" Regards Joshi
  3. $query = sprintf("SELECT * FROM users WHERE user='%s' AND password='%s'",           mysql_real_escape_string($user),           mysql_real_escape_string($password));
  4. Well! For pagination you have to  use 'LIMIT' clause. First execute the main query and count number of rows in it.after that execute the same query with LIMIT clause for this you have to pass two variables.one is the starting point of the result and second one is number of rows is should fetch from the result. example : LIMIT 0,20.then it will fetch 0,20 rows Next when you are going to next page you should increment these values. Let us suppose maximum rows you want to display is '25' rows per page So when you came to the first paeg these values should be 0,25 second time , it should be 26,50; You can do this by calculating with page numbers like $showrows=25; if ($currrow=='') { $currrow=0; } if ($page!='' && $page>=1) { $currrow=($page-1) * $showrows; } else { $page=1; } then limit clause will be LIMIT $currrow, $showrows Hope i haven't much confuse you!
  5. As much as i know , in PHP supports its own style font in Pritning and image functions. we need some GD libraries for this one! If i am wrong any one could correct me!  :P
  6. Visit this URL! There you can find plenty of Editor versions. http://www.download.com/3150-2048-0-1-1.html Regards, Joshi
  7. I think problem is with the blank lines after you started outputting to XML file.Try by removing those blank lines. Regards Joshi
  8. Well! you can't really pass an directly from one form to another.If you want to do it still , at the end of the script , take the araay and make it as a string using a deliemter and 'implode()' statement and post it to next script.In next script again have to use explode command with delimeter you put in previous page to form the array again. About sessions..i think we can pass an array using a session, if an array is assigned to session variable. If i am wrong ,any one could update me! :) Regards joshi
  9. Is this what you are looking for? [code] <?php <input type="radio" name="name" value="1" <?php if($placesbookid==$capacity) echo "disabled";?>> ?> [/code] Regards Joshi
  10. 1. If you want to show  the categories in registration form, what you are going to put in admin page, then sure you should code first admin page and then registration form. 2.HTML or PHP :If you have to perform any db related work or files including, then file extension should be .php. Regards Joshi
  11. I think you can use this for downloading a file. header("Content-type: application/binary"); header("Content-Disposition: attachment; filename=resultado.xml"); header("Pragma: public"); header("Cache-Control: max-age=0"); Regards joshi.
  12. Just remove the above part of the query.I think that part is automatically generated by Dreamweaver.Use just query part.nothing else and let us know the status.
  13. Replace your query with this query [code] <?php $query_Recordset1 = "SELECT CONCAT('$',SUM('$last_Recordset1','$last2_Recordset1','$last3_Recordset1','$last4_Recordset1'))  AS `count1` "; ?> [/code]
  14. Oh Sorry! [code] <?php if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "addlisting")) {   $insertSQL = sprintf("INSERT INTO uploaded (type, name, URL, description, address, phone_number, email, imageURL) VALUES ('$_POST[form_menu]','$_POST[form_name]','$_POST[form_url]', '".addslashes($_POST[form_description])."',          '$_POST[address]','$_POST[phone]','$_POST[email]','$_POST[uploaded]')); ?> [/code] Try this now!
  15. select sum(field1,field2,field3,field4) as First_count, sum(field5,field6,field7,field8) as second_count from table_name; For dollor sybmol you have to append it seperately. Is this what you are looking for? Regards, Joshi.
  16. I think you are using dreamweaver generated code for form insertion.anyway.. if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "addlisting")) {   $insertSQL = sprintf("INSERT INTO uploaded (type, name, URL, description, address, phone_number, email, imageURL) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)",                       GetSQLValueString($_POST['form_menu'], "text"),                       GetSQLValueString($_POST['form_name'], "text"),                       GetSQLValueString($_POST['form_url'], "text"),                       GetSQLValueString($_POST['form_description'], "text"),                   GetSQLValueString($_POST['address'], "text"),                   GetSQLValueString($_POST['phone'], "text"),                   GetSQLValueString($_POST['email'], "text"),                       GetSQLValueString($_POST['uploaded'], "text")); Replace it with this [code] <?php if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "addlisting")) {   $insertSQL = sprintf("INSERT INTO uploaded (type, name, URL, description, address, phone_number, email, imageURL) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)",                       "GetSQLValueString($_POST['form_menu'], "text")",                       GetSQLValueString($_POST['form_name'], "text"),                       GetSQLValueString($_POST['form_url'], "text"),                       ".addslashes(GetSQLValueString($_POST['form_description'], "text")).",                   GetSQLValueString($_POST['address'], "text"),                   GetSQLValueString($_POST['phone'], "text"),                   GetSQLValueString($_POST['email'], "text"),                       GetSQLValueString($_POST['uploaded'], "text")); ?> [/code] Try it.
  17. GetSQLValueString?? What it is this? sorry i didn't understand you. but i can say you can use it directly in insert query too. see this example. $sql="insert into table_name (id,name) values ('$id','".addslashes($_POST['name']."')"; Let us know if you still had  a problem with it please post your piece of code here . :) Joshi.
  18. For that you have to set a SESSION variable with time limit to expire. once an user logged in to that site you should keep track of time comparision between how much time user spent in site and the maximum time limit to session expire.If the user time is close to maximum time, then you can display a message to user.
  19. I think addslashes() will works for you! before passing the value to database send it as 'addslashes(value)' .while displaying again to form  use 'stripslashes(value)' so that it will escape all the ' with backslash.
  20. Simple! $query1 = $_GET['variable'].' '.$_GET['variable2']; $terms = split(" ", $query2); Regards, Joshi.
  21. Well! It is ok to include dbconnection file in every file.It is enough too.no need to call that file again and again.But you should remember that, if there is any included files in your first file , where you are calling dbconnection file, and the called file also had a dbconnection file calling then you will get this errors. So you don't require to call dbconnection file in included files. For session_start also it is same. Regards, Joshi.
  22. Hi, There shuold be  a better way to do it.but now this only strike in mind  :-\ , see the query $sql="select Name from members"; $qry=mysql_query($sql) or die ('Name not found in this table'); If anyone has better ideas..update me ;) Joshi
  23. Hi, In your first image screen..there is nothing to select anything.Just ignore it as of now. In second screenshot you are pointing to the correct place..there it will display the list of existed databases. If you have had already created database , you can select one of them and continue with it. else you want to create a new database , click on 'SQL' link on just above to the list of databases.There execute the commands for creating database. after that you have to select the database. Next use the same 'SQL' link window  to execute the sql queries in your files. If still you have any problem with this, let us know about it. Regards, Joshi.
  24. Normally mysql_affected_rows will return -1 rows only when the query fails. It would be better to post your code to check if you can.
×
×
  • 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.