396 Posted Topics
Hi, Assume I start session and print data stored in session and print some html stuff at the begining of php file. Then I need to use header() to download a file afterwards. When I do it i get this error: [CODE]Warning: Cannot modify header information - headers already sent … | |
Hi, Code below fails and I cannot solve it. [CODE] $folder="myfolder/files"; $file="1.doc"; header("Content-type: application/msword"); header("Content-Disposition: attachment; filename=".$folder."/".$file); readfile($file); [/CODE] The file link I get when popup opens is " myfolder_file_1.doc ". I don't know where does the underscore comes from. Any idea? Thanks | |
Hi, I have files in a folder. When I list those files in my PHP site, all the hyperlinks shows full path of the file on status bar of the browser. e.g When mouse over hyperlink, it shows "..../personalFolder/hello.doc" How can i solve this problem? I think this is a … | |
Hi, I have a project where more than 1000 users will upload files in one day. I need to use FTP to do this but I don't know what to use. So far I read about cURL, PureFTPd, Squid, ProFTPd. I have a server machine with LAMP installed to will … | |
Hi, Is cURL FTP to upload word files to webspace or inhouse server is better option than using simple PHP file uploading function "move_uploaded_file()", if there are around 1000 user upload files in a day? Or is there any better solution? Thanks in advance | |
Hi, There will be more than 3000 users will upload word document to different folders on my webspace at SAME TIME. How should handle it? I did file uploads but not for more than 4 or 5 user uploded at a time. PHP and MySQL is used. Thanks | |
Hi, [code] INSERT INTO person (name, surname, fk_accessid) values ('$name', '$surname', SELECT id FROM access WHERE name = '$uid' AND psw = '$psw') [/code] Hi above code doesn't work. Is there such thing thou? EDITED: Note: I meant to open this in Mysql forum but I cannot move it now. | |
Hi, I've installed Netbeans 6.5 which is for JAVA with apt-get and want to uninstall it. How do i do it? Thanks | |
Hi guys, I am new in OOP. I know the rules and use of abstract classes but, I just want to know why we should use abctract or what is the purpose of it, rather than using normal classes while we can accomplish same thing in both ways? If i … | |
Hi, I need a PHP IDE that has versions for Linux and Windows and runs without wasting a lot of memory. Also, i want it to show what variables, class and function names are already in use. Am I asking too much? Thanks ![]() | |
Hi, I use phpMailer to send authenticated email. The mail i sent goes into bulk or junk folders in yahoo and hotmail. They should go to inbox. How can i solve this problem? Thanks [code] $mail = new PHPMailer(); $mail->IsSMTP(); $mail->Host = "mail.myserver.com"; $mail->SMTPAuth = true; $mail->Username = "username"; $mail->Password … | |
Hi, Why this code doesn't work? All I want to do is removing all the white spaces. JavaScript [code] function validateForm(){ var postcode1 = (document.form1.textPostcode1.value).replace(/^\s*|\s*$/g, ""); if (postcode1 == "") { alert ("ERROR"); } else { alert ("CORRECT"); } } [/code] HTML [code] <form name="form1" action="save.php" method="POST" onSubmit="return validateForm()"> POSTCODE: … | |
Hi, How do i prevent printing "Warning" bit of connection error? I only want see my error message on screen. Note: I deliberetly enter wrong Host IP to see the message thou. [code] Warning: mysql_connect() [function.mysql-connect]: Host '127.0.0.123123' is not allowed to connect to this MySQL server in C:\apache\login\database.php on … | |
Hi, Let's say I am opening my start up company and don't want to spend money on software. I have 2 questions for you who has experince in Linux. 1. I need a Linux server machine with GUI which should be Linux ... ? I heared that SUSE is good … | |
Hi, I have two classes. I user [inlinecode]throw new Exception("Error");[/inlinecode] in first class. I want to catch that error message in second class with "try catch". How do i do it? Thanks | |
Hi, I need a php editor where i can see what variables, class names, function names are already in use and if it is possible (not necessary) debugger. WinXP: ? Ubuntu: ? What editor do you suggest me? Thanks in advance | |
Hi, I just want to find out which is better? Thanks [code] ...... echo "Database connection error"; exit; [/code] OR [code] ...... die ("Database connection error"); [/code] | |
Hi, I want to learn ZEND Framework. I have checked the courses and they are very expensize. My question is, if I buy a book for ZEND, do you think i could learn it. I know PHP5 and OOP. I am open for other recomendations. Thanks | |
Hi, Is there any chance of resizing gif, tif, bmp, jpg, png I know that we can jpg files. Thanks | |
Hi, I have 2 questions about domain names and SEO. 1. I have www myname co uk with Google Page Rank 5 and come as the first website in Google search results for xxx keyword in UK. If I buy www myname com will it come as first website in … | |
Hi, I want to show the image as well as printing the id, name, time etc with it. How can I do it? First code prints all the data as it is without showing image. Second code shows image without other info. Thanks This code returns binary code of image. … | |
Hi, I read a bit about both but I need to see your opinions about this. Are cURL and xmlrpc used for same purposes, are they same thing? Thanks | |
Hi, Which one is loaded faster? Shall I store an image in my hosting an display it or outsource it from different website and display it in my website? <img src="in my image folder/image.jpg" /> OR <img src="http://www.otherwebside/image.jpg" /> Thanks | |
Hi, Can anyone help me converting this wsdl 1.1 file into 2.0. Thanks [code] <?xml version ="1.0" encoding ="UTF-8" ?> <definitions name="Catalog" targetNamespace="http://localhost/apache/soap6/catalog.wsdl" xmlns:tns="http://localhost/apache/soap6/catalog.wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/"> <message name="getCatalogRequest"> <part name="Symbol" type="xsd:string"/> </message> <message name="getCatalogResponse"> <part name="Result" type="xsd:string"/> </message> <portType name="CatalogPortType"> <operation name="getMyCatalog"> <input message="tns:getCatalogRequest"/> <output message="tns:getCatalogResponse"/> </operation> … | |
Hi, I read this ob_start() but want a bit cleaner explanation. why we use it, should we use it, what happens if we don't? I have never used it and won't use it until I understand it is best practise. Thanks in advance | |
Hi, Code below returns this. [code] Array ( [0] => 3 [id] => 3 [1] => John [name] => John [2] => Goog [surname] => Goog ) [/code] Everything repeated. Why? Also, I need to serialize. I need it for some other reason. [code] $sql="SELECT * FROM friends WHERE id='3'"; … | |
Hi, index.php posts data to process.php I want users to remain in index.php when they summit their form. I have seen this in some websites but don't know hot it done. Can anyone help me? Thanks | |
Hi, nusoap doesn't support php 5.3 therefore, It is not usable for me. Is there any SOAP+PHP example for me to be run on my localhost rather than pointing/accessing wsdl files of other websites? Everything should be stored in my localhost. Thanks | |
Hi, I need an php soap example that should run on my local wampserver. Also, wsdl file should be in my www/mytest folder with server and client php files. Not outsourced. I tried a lot from web but they all outsource wsdl in their servers. Thanks in advance | |
Hi, How do i post data from windows form to a website. Windows form is VB6 or VB.NET Website is PHP site where incoming post data is processed. Example: Command will send 'Hi' in a variable, PHP site wwill print 'Hi' on the screen. Thanks | |
Hi, X user uses his/her windows/Linux based software to publish content (job, item to sale or rent etc) in my PHP website. Something like posting data from a computer based software to website OR from a website to a website. I’ll start doing this based on you guys’ information. Thanks … | |
Hi, We can code this way to print something if Exit button is clicked. [code] <form action="process.php" method="POST"> <input type="hidden" name="hiddenName" value="Jolly" /> <input type="submit" name="submit" value="Exit" /> </form> if($_POST["submit"] == "Exit") { echo $_POST["hiddenName"]; } [/code] What about if we use this way. How do i check if Exit … | |
Hi, This code doesn't work in Firefox? Is there any other way of closing window? [code]<A href="javascript: self.close ()">Close this Window</A>[/code] Thanks | |
This is content of in.header.php [code] if(!isset($session_id) || empty($session_id)) { session_start(); $_SESSION["Inputs"]=array(); } [/code] This is index.php which also has form objects that POSTs other values to step1.php [code] require_once 'inc.header.php' $_SESSION["Inputs"]["name"]="MyName"; $_SESSION["Inputs"]["surname"]="MySurname"; [/code] This is step1.php [code] require_once 'inc.header.php' $_SESSION["Inputs"]["age"]=$_POST["textboxAge"]; print_r($_SESSION["Inputs"]); [/code] Problem is print_r prints only [inlinecode]Array ()[/inlinecode]. … | |
Hi, What is the best WYSIWYG PHP, HTML, CSS etc. editor for Ubuntu? Thanks | |
Hi, I am trying to backup one of my Mysql database with a PHP script. [code] <?php $host="localhost"; $database="toy"; $username="root"; $password=""; $connection=mysql_connect($host, $username, $password); if(!$connection) { die("ERROR: Couldn't connect to the server."); } else { $dbSelect=mysql_select_db($database); if(!$dbSelect) { die("ERROR: Couldn't select the database."); } else { $mysqldumpPath="/usr/bin/mysqldump"; $backupFileName = "Desktop/toy-`date … | |
Hi guys, I have questions and want to clarify these before creating an e-commerce website. Are statements below correct? 1. I need to buy SSL certificate to provide HTTPS pages in my website. 2. I need to contact my local bank to enable me providing online payment things for users. … | |
Hi, I will be using Ubuntu first time for PHP and want to sure that i use a php editor with debugging feature because, i want to see the mistakes at same time. What do you preferr and how can i install it? [code]sudo get-apt install ....[/code] Thanks ![]() | |
Hi, What is the difference between installing Wampserver and Tomcat Apache? Wampserver installs : PHP, MySQL, Apache Server Tomcat Apache: Does it only installs Apache Server? If yes i probably manually install PHP and MySQL too. Thanks | |
Hi, I use this code in Windows (wamp), it works fine. When i use it in Ubuntu it generates this error "Warning: Cannot modify header information - headers already sent by (output started at /var/www/toycar/header.php:9) in /var/www/toycar/classes/class.basket.php on line 17" There is no blank space anywhere. What do i do? … | |
Hi, There is an error on [inlinecode]DataGrid1.DataSource = Adodc1.RecordSource[/inlinecode] method or data member not found. When i do below setting manuel in properties, there is no problem. Thanks [code] Adodc1.ConnectionString = "Provider=MSDAORA.1;Password=psw;User ID=iuu;Data Source=video;Persist Security Info=True" Adodc1.RecordSource = "Select * From movie" DataGrid1.DataSource = Adodc1.RecordSource [/code] | |
Hi, I have a place called "31 GB Media" which is C: drive in MyPlaces. I wanted to copy a folder from it to Ubuntu. I have typed this line in terminal but "No such file or directory" is returned. [code]sudo cp -r /31\ GB\ Media/Test/FolderWithFiles/ /var/www/[/code] Where is the … | |
Hi, i wanted to remove .php and place / but, it doesnt work. I get "500 Internal Server Error" message. [code] RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^([^/]+)/$ $1.php # Forces a trailing slash to be added RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$ RewriteRule … | |
Hi, I have [inlinecode]header("Cache-Control: private");[/inlinecode] in page1.php to prevent page expiry problem. Let's say, when user click on Submit button it will go to page2.php Page1.php should expire if the user hit Back in the browser to go back from page2.php to page1.php How can do it? Thanks | |
Hi, I use [inlinecode]header("Cache-Control: private");[/inlinecode] to prevent page expiry problem. It is to make browser’s “Back” button work otherwise; page expires if user hits “Back” button to go back and see previous pages. I have 3 steps buying process. 1. Delivery address selection from radio boxes 2. Creadit card details … | |
Hi, I use a submit button to go to next page with posting a value. When i click on back (button in the browser) to go back to previous page, it says "Page is expired. Information must be send to display this page erc etc". I don't want to face … | |
Hi, My HDD is divided into 2 partition. I have Ubuntu installed on one partition and Win XP Prof installed on another. I obviously select one to boot my computer. Let's say I booted from WinXP and also want to use Ubuntu without restarting the PC. Is this possible. Do … | |
Hi, I want to create quick preview window for images listed in my website. For example: if you go to this site [url]http://www.templatemonster.com[/url] there are little images on the right end side. When mouse over on any image, a bit preview window opens. I want something like this. How can … | |
Hi, What is the best out of "em, pt, px, %" to use for all browsers and platforms? e.g. pt is better for this purpose. em is better for this purpose. etc. Thanks |
The End.