- Strength to Increase Rep
- +6
- Strength to Decrease Rep
- -1
- Upvotes Received
- 7
- Posts with Upvotes
- 7
- Upvoting Members
- 7
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Check out my blog about PHP, HTML and CSS: http://blog.pepa.info/
81 Posted Topics
Re: It depends on how you want to process the information after it has been stored. If you plan to use complex queries like "students who like (music AND (sports OR adventure))" then the only viable solution is 1:n - having a db table of relationships between students and their interests. … | |
Re: I haven't been working with cake shell script for a while but in my last project (CakePHP 1.2.5) I had to cd into the app directory first. Then the script placed the files where they belonged. So make sure you're in your "app" directory before executing cake.bat. I just noticed … | |
Re: Hi Zack, the bug will probably lie in a piece of code that you haven't pasted. It appears that the first piece of code you pasted isn't related to the second in any way. It doesn't show how values end up in $_SESSION['nameItem'] or $_SESSION['quanItem']. Please attach a complete source … | |
Re: Hi xxreenaxx1, first off: a code that isn't indented properly is hard to read. Please help us help you, and write code as [CODE] if (...) { ... ... } [/CODE] and not [CODE] if (...) { ... .... } [/CODE] Anyway, this is how you insert values into a … | |
Re: Hi Jacob, the easiest way would be to use some mailing library like XPertMailer [url]http://www.xpertmailer.com/[/url]. It would take care of all the boring stuff related to sending attachments or html e-mails or validating e-mail addresses, or even protecting yourself from e-mail injection attack. If you however, insist on implementing it … | |
Re: Hi andrewliu, you will have to set a limit one way or another: a) either you say "show max $x rows per column b) or split the output into $y columns I guess you prefer (a). There's no (widely supported) HTML tag for columns so either you will have to … | |
Re: Hi AntiQuark, the first array item will always contain the whole captured area so for getting the individual parts, you need to start with key 1. In your case I would try simplifying the regexp by making it more universal. Let's say it's a sequence of key=value separated with |. … | |
Re: Hi lit108, your code doesn't show where you get the XML string. Are you calling addFeeds() with $urls from the first snippet? If you don't modify or create the XML then the XML stored in the database must already be bad. It's probably not that 'more than 2 urls' trigger … | |
Re: Hi vijiglad, you can't directly copy from a server to a server without the file going through your server (not with PHP). The solution is to split the procedure into two steps: 1] download to a temporary location on your server 2] upload to the target server and then delete … | |
Re: Please don't create multiple threads with the same question. Here's your answer: [url]http://www.daniweb.com/web-development/php/threads/352655[/url] | |
Re: Hi Jacob, the query for creating the database would be create table login `name` varchar(255), `user` varchar(255), `pass` varchar(255), `birthday` date; Please consider encrypting the password using MySQL function PASSWORD(). If your site gets hacked you won't compromise your users passwords. (It will be enough that the hacker gets their … | |
Re: Hi Anirban, please send a link to what you have already programmed and describe what issues you're having. | |
Re: Hi Mexabet, unless you want to create the thumbnail yourself (e.g. [url]http://www.zubrag.com/scripts/website-thumbnail-generator.php[/url]) you could use some of these: [url]http://thumbnails.iwebtool.com/[/url] [url]http://www.splitbrain.org/blog/2007-08/23-free_website_thumbnail_services[/url] I don't want to sound rude but... did you use Google before asking (query: website thumbnail)? As for PageRank, try looking into source code of these Firefox extensions: [url]https://addons.mozilla.org/cs/firefox/search?q=pagerank[/url] | |
Re: Hi there, I suspect that it fails because it looks for the font in a wrong directory. You can either specify the path in the call of imagettfbbox [code=php] imagettfbbox($font_size, 0, 'c:/windows/fonts/monofont.ttf', $code) [/code] or use environment variable to set the path for all calls. [code=php] putenv('gdfontpath=c:/windows/fonts/'); [/code] I'm not … | |
Re: Hi maydhyam, if you use a professional hosting (someone has set up the server for you) you don't have to worry about anything. Just use mail(). If you're running your own server (e.g. development server) then you need to check php.ini section [mail function]. For Linux you have to verify … | |
Re: Hi Punkis, character encoding mismatch can be a nightmare. The database, tables and attributes all have charset and collation. Make sure it's set to UTF8 and utf8_general_ci (or utf8_your_language_code). Then you need to make sure that you select a character set both when importing into and when reading from the … | |
Re: Helo Bear, I guess the immediate problem is that you reference $checkbox instead of $_POST['checkbox']. You use $_POST['delete'] so you probably work in an environment with register_globals off. There is a few other things that I would like to draw your attention to: * I guess you wanted to use … | |
Re: Hi Namratashukla, I don't see a problem in updating a large number of records in database tables. You ask how - the answer is using UPDATE or INSERT statement. I'm not sure if you're new to SQL (then google for "sql tutorial" or "sql reference") or if you didn't provide … | |
Re: Hi Welbzobeng, have a look at the query. After SELECT and before FROM it lists what attributes it will fetch for you. [icode]files.*[/icode] means "all attributes from table files so your artist should be covered. You didn't say what attributes your db table "files" has so I can only assume … | |
Re: Hi Venom Rush, please include a link to the project so that we don't have to search for it. I would be surprised if they didn't have a usage example on their website. | |
Re: Hi Asyieen, I'm afraid the reason why nobody has answered so far is that it's not very clear what you actually want. You posted a script that inserts records into projectcontact and user_upload. And you say you want to display "these two elements". Word "element" is usually used for referencing … | |
Re: I'm afraid you're not giving the full story here. Is this script is embedded in a HTML document that has the Home title? And you need to include (using require()) a part of this HTML document, right? If my guesses are right then: You cannot have two TITLE tags in … ![]() | |
Re: Hi there, in HTML apply this [code=html] style="mso-number-format:'\@';" [/code] to cells with your . values or define a CSS class with this style and apply the class. | |
Re: Hi there, you're using function [icode]getParam()[/icode] that isn't PHP built-in function. So I guess you forgot to include a file that defines it. | |
Re: No. PHP runs on a server while you want to drag and drop on a client (your browser). You will have to use AJAX, flash or Java applets for this kind of magic. For that I suggest asking in different forums on this server. | |
Re: Hi there, you're treating $value as if it were an object while it is in fact a string "". You cannot write $value->id unless you first assign an instance of an object to $value. | |
Re: Hi Khanbaba, the problem is not related to your stored procedure. mysql_connect doesn't return an object but a resource pointer. Therefore you cannot use [code=php] $resource = mysql_connect(...); $resource->prepare(...); [/code] You have probably confused it with mysqli() set of functions: [code=php] $mysqli = new mysqli(...); $stmt = $mysqli->prepare(...); [/code] btw: … | |
Re: Hi Kwesiaryee, I suggest you try a server like scriptlance.com or offer a bounty for this task. It's too much work to do for free. My understanding is that people in this forum help with technical difficulties, single and isolated problems. People who need to know something ask questions here. … | |
Hi there, I have read a few articles about WordPress plug-ins and themes but I can't figure out how to create a completely new page that uses theme. Let's say that my blog is set up to display post detail with the following url: [url]http://myblog.com/2008/06/29/this-is-title[/url] I want the comments listing … | |
Re: Hi there, the bug is in this if statement. Try using parentheses to make your intentions more clear: [code=php] if ( (!isset($filter)) && ($page == 1) ) [/code] Frankly I would just write this instead of the whole if/else if bunch: [code=php] if ($page == 1) imagegif($image, "user/" . $user … | |
Re: Hi there, the main thing is that you start with applying md5() to the password so even when the password was empty you get something (this: d41d8cd98f00b204e9800998ecf8427e). The solution is to test not $Password (that contains the md5 sum) but $_POST['Password']. I'm not sure about what you mean by "plus … | |
Re: Hi there, I'm not sure I understand. It sounds like you already have what you want. You said you want to display a file size in a browser after user selects the file to be uploaded. Why can't you use the jqUploader as it is without modifying the source code? … | |
Re: Good news, it works now :-) Tested in MSIE and Firefox. I do see the banner - when I switch off my Adblock, of course ;-) I think it was either Google problem or something with your connection. The way you included the code is correct (I prefer using " … | |
Re: Hi there, sorry I can't help you but you won't solve this situation by having a discussion in a forum. What you really need is someone with CakePHP and ASP experience and you will have to pay him/her to do the job. Be prepared that it won't be trivial although … | |
Re: Hi Tanha, why do you think that using classes and objects will help you achieve what you want? It's just a different programming method as compared to linear, or spaghetti :-) code. If you insist on a class then simply take your code and wrap it as a class. Also … | |
Re: Hi Ctoz, I suppose that your server supports PHP (e.g. your hosting plan includes PHP). A PHP script must (under normal circumstances) be saved in a file with extension .php and the script inside of it should be wrapped in <?php and ?>. I suggest you start with a simple … | |
Re: Hi Camdes, I must be missing something. If you managed to write a thumbnail creating code there must be something awfully difficult about making the 3x4 table. Anyways, here's my code (cut from my existing script that displays links in a grid): [code=php] $columnsNumber = 4; // there will be … | |
Re: Hi, first let me suggest that you should think of some less complicated way of displaying the data. I guess you could achieve the same result with just about twenty lines of code. But to answer you questions: [LIST] [*] The main problem probably is that you have [icode]echo '<tr>...[/icode] … | |
Re: Hi there, I run PHP on a Windows box but with Apache (very easy to set up with XAMPP [url]http://www.apachefriends.org/en/xampp.html[/url]). I didn't hit this problem even though I worked with osCommerce. Could this be the solution for you? [url]http://www.somacon.com/p255.php[/url] | |
Re: Hi I also used to set up my own configuration until I got fed up with it and switched to XAMPP. Give it a try: [url]http://www.apachefriends.org/en/xampp.html[/url] However, if you can't or don't want to then post here your httpd.conf so that we have something to start with. There can be … | |
Re: Hi there, I have no experience with printing directly from PHP but here's what I found in PHP manual. I hope it helps. [code=php] $handle=printer_open("EPSON TM-T88III Receipt"); printer_set_option($handle, PRINTER_MODE, "RAW"); printer_write($handle, $yourRawData); printer_close($handle); [/code] | |
Re: I'm afraid it isn't possible. But if you tell us why would you ever want such a thing maybe someone will come up with a better solution. | |
Re: Hi Cente, I got a bit lost in your description but here're my five cents: [list] [*] to redirect a browser to FTP use [icode]header("Location: ftp://example.com/directory/file"); [/icode]. It's the same as with HTTP. [*] URL that contains username and password looks like this: [icode]ftp://user:password@example.com/directory/file[/icode] [*] To assign privileges to an … | |
Re: Hi Anish, I don't quite understand your description. What do you mean by "pass null values to integer"? PHP NULL values won't be passed to MySQL as NULL you have to explicitly type NULL. Example: [code=php] if ($value === NULL) $sqlValue = "NULL"; else $sqlValue = "'".mysql_real_escape_string($value)."'"; mysql_query("INSERT INTO mytable … | |
Re: Hi Anitha, I'm sorry but "0245875224485" isn't a unicode format for anything but "0245875224485". "Anitha" in unicode would again be "Anitha". I guess that when you try to convert Unicode to some ISO charset you will find out that it didn't help. But let's stick to your specs. To convert … | |
Re: Hi, please tell us what's wrong with the code, or what do you want from us. | |
Re: Hi there, could you please let us know what isn't working? I.e. what is the behaviour you expect and what is it doing instead. BTW: Are you sure you need all that JavaScript hassle with onClick on the checkboxes? Maybe you don't know what is being submitted. For example here: … | |
Re: Hi there, locate httpd.conf and change Listen 80 to some other port number, for example Listen 81 After starting up your Apache you'll be able to reach it via [url]http://localhost:81[/url] | |
![]() | Re: Hi there, I don't see that you'd be using $gametype or $gamesize. Could you please add some code that proves that they are empty indeed? Also did you try displaying $_FILES['game']? Add [icode]var_dump($_FILES['game']);[/icode] to see what's in there. Your HTML code doesn't end the table and the form. Also you … |
Re: Hi Peter, you could use your webhosting's SMTP server but PHP doesn't support SMTP authentication out of the box. You have two options: a) Either you will use your Internet provider's SMTP server (your home/work ISP) because then I believe you won't have to use SMTP authentication (authentication is usually … |
The End.