Jump to content

joshi_v

Members
  • Posts

    168
  • Joined

  • Last visited

    Never

Everything posted by joshi_v

  1. See if you want to use XML for download purpose, place all the contents in a file. and make it available for download option. [code] header("Pragma: public"); header("Cache-Control: max-age=0"); header("Content-type: application/vnd.ms-excel"); header("Content-Disposition: attachment; filename="filename.xls"); header("Expires: 0"); [/code] after this code specify all the column names. arrange the data in rows. Hope i am not wrong! if so anyone please correct  me!
  2. Have you check in your  php.ini settings? because when you are using an URL as file name , fopen_wrappers have been enabled. Regards, Joshi.
  3. If u can post your code, it will be helpful to see where is the problem!
  4. Make sure that all variables are passing to that query or not! pritn the query to the browser. [code] $sql= "UPDATE projects set name='$name',description='$descr',updte_date='$update_date',progress='$progress' where id= '$id' "; echo $sql; [/code] If all variables are passing correctly, then check the query directly in phpMyAdmin. Regards, Joshi.
  5. [code]if($_POST['zpageUPDATE']){ $sql = "UPDATE `zpageInfo` SET `location` = '$_POST[location]', `film` = '$_POST[film]' `literature` = '$_POST[literature]' `music` = '$_POST[music]' `aboutme` = '$_POST[aboutme]' `friends` = '$_POST[friends]' WHERE `id` = '$_SESSION[id]'"; $query = mysql_query($sql) or die(mysql_error()); }[/code] In the query you should separate each argument you want to update by using an " , " like this [code] $sql = "UPDATE `zpageInfo` SET `location` = '$_POST[location]', `film` = '$_POST[film]' , `literature` = '$_POST[literature]' , `music` = '$_POST[music]' , `aboutme` = '$_POST[aboutme]' , `friends` = '$_POST[friends]' WHERE `id` = '$_SESSION[id]'"; [/code] Regards, Joshi.
  6. Well as chrisdburns  told you could use mysql for that. Just store all the template names along with month in a table. before loading the form where you want to place the template, query the mysql with current month.it will gives you the template name for that month Then include that template in your form. Simple.
  7. Change this update query [code] $sql = "UPDATE projects set (name, description, update_date, progress) VALUES ('$name', '$descr', '$update_date', '$progress' WHERE id = '$id'"; [/code] Like this, [code] $sql= "UPDATE projects set name='$name',description='$descr',updte_date='$update_date',progress='$progress' where id= '$id' "; [/code] Cheers!
  8. Can't you use in_array function for your problem? it will be like this in your situation. [code] <?php $list = array (   'one',   'two',   'three' ); if (!in_array($test,$list)//It will check whether $test in $list or not. {   // do something } ?> [/code] Hope this helps you!
  9. My choice will be http://www.tizag.com/mysqlTutorial/ and for complete tutorial http://www.php-mysql-tutorial.com/mysql-tutorial/index.php These two sites will help alot for beginners. Hope it helps you too! :)
  10. Try to pass u r variable values in single quotes. hope it will solve your problem. Regards, Joshi.
  11. If  you are not printing any data to the browser you can use headers in php. [code]header("Location : filename");[/code] If you like to use javascript [code] window.location.href="filename with path"; [/code] Regards Joshi.
  12. As per as i know, I think there is a file already called index.php in template folder.That is not created by some another user.when you try to open a new file , it is trying to open the file in /templates/index.php. It is not going to the new folder. So have a try on this. $file = fopen("httpdocs/template/$company/".$createfile, 'w+') or die("can't open file"); Good Luck!
  13. Yes.But there is one problem. If i use session or hidden variables..it won't reflect the changes if i make any, after assigning values to that variables.For some reason i can't use hidden variables. So pls tell me any other option if is there? Thanks! Joshi.
  14. First you tell me /home/httpd/vhosts/buscandomusicos.com/httpdocs/template/xxx What is the 'xxx' in above line? is it  a file name? check whether you have permissions to create a new folder in server or not?
  15. Make a script with the following function to check PHP settings. [code] <?php //this function will return all the PHP settings. phpinfo(); ?> [/code] upload it to the server, where you are getting these errors and check.
  16. Hello Everyone! I had a form with radio buttons.form is spreaded for 4 pages.and all the radio buttons are selected in that form(all in 4 pages).now my problem is when i post the form , it is not posting all the radio button values selected in the form.It is only posting the values of the page from where i am saving the form. But i need all the selected values. So please help me how to get all values? Thanks! Joshi.
  17. The file you are trying to create and the directory has different owner settings. If SAFE MODE is on , you can't access another user's files. So make sure that , the directory and the file you are tryign to create has the same uid's. Hope this helps you!
  18. It will depends on your code. see the examples. [code] <?php // destroy a complete array. unset ($foo); // destroy a single element of an array unset ($bar['quux']); // destroy more than one variable unset ($foo1, $foo2, $foo3); ?> [/code] Regards, Joshi.
  19. If you just want to post the whole stuff again , i think u can use headers to redirect to the same file! If it is in JavaScript ,you can use, [code]window.location.href='filename with file path' ;[/code] Regards, Joshi.
  20. Which Operating system you are using? Check the folder permissions where ur  trying to store the session variables!and make sure you haven't give any spaces before session_start calling. Regards, Joshi.
  21. So you mean we can't post an array directly as it is, right? Anyway i am going to use your suggestion. Thanks once again!
  22. Thanks for response! exactly what i am tryign to do is passing an array like . i tried it but it is showing empty array even though there are some values in the actual array i am trying to pass. [code]$array_name=array("1","2","3"); <input type="hidden" name="test_array" value="<?=$array_name;?>">[/code] So please  tell me how to pass this as hidden? Regards, Joshi.
  23. Hello everyone! Can you tell me how to pass an array as hidden variable? is it possible? If so please give me an example. Regards, Joshi.
  24. Hi Are you sure .. all the variables are passing properly to the mysql_pconnect function? Regards, Vijaya.
  25. Try this! substr(md5(uniqid(rand(), true)), 0, 12); Here 12 will be the maximum length of the random number . Regards Joshi.
×
×
  • 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.