1,376 Posted Topics
Re: [QUOTE][CODE=php]CREATE TABLE `kclove`.`users` ( `userID` INT( 11 ) NOT NULL AUTO_INCREMENT COMMENT 'auto_increment', `name` VARCHAR( 255 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL , `username` VARCHAR( 255 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL , `password` VARCHAR( 255 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT … | |
Re: Just use the file_get_contents() function. Very simple but make sure you place the http:// or https:// before the domain. Below is an example: [CODE=php]<? $webpage_data=file_get_contents("http://www.google.com/"); echo $webpage_data; ?>[/CODE] | |
Re: [QUOTE=death_oclock;798872]TommyBs is right. You don't need 's around your field names, and definitely don't use `. Is there in fact a field named status? And try doing this query directly in MySQL (via phpMyAdmin if you have it) and see what error you get.[/QUOTE] From my experience, some servers have … | |
Re: Try the following to match the 2: [CODE=php]$input='bluefox'; $database_input='Blue Fox'; if (str_replace(' ','',strtolower($input))==str_replace(' ','',strtolower($database_input))) { echo "They match"; }[/CODE] ![]() | |
Re: [QUOTE=phper;798428]Does Yahoo mail support SMTP?[/QUOTE] Yes it does. The settings can be found at [URL="http://help.yahoo.com/l/us/yahoo/mail/original/mailplus/pop/pop-14.html"]http://help.yahoo.com/l/us/yahoo/mail/original/mailplus/pop/pop-14.html[/URL] The settings are as follows: [CODE]SMTP Server: plus.smtp.mail.yahoo.com (Use SSL, port: 465, use authentication) POP3 Server: plus.pop.mail.yahoo.com (Use SSL, port: 995) Login username: Your Yahoo! Mail ID (your email address without the "@yahoo.com") Password: Your … | |
Re: Try something along the lines of the following: [CODE=php]<? $file='file.txt'; //set the file name and path $lines=explode(' ',file_get_contents($file)); foreach ($lines AS $line) { if ($_POST['username']==$line) { $userfound='true'; break; } } if ($userfound=='true') { //script for if user is found in text file } ?>[/CODE] Although the above code should work … | |
Re: For that you could just convert both values to lower case with strtolower(); So try the following and I have included the form. [CODE]<? //mysql connections $username='Admin'; //from mysql in your script $username=strtolower($username); if (isset($_POST['username'])) { $_POST['username']=strtolower($_POST['username']); if ($_POST['username']==$username) { //login } } ?> <form method='post'> <input type='text' value='adMiN' name='username'> … | |
Re: I answered a simular question on phpfreaks.com about embedding the google translator into your website and the script I came up with is as follows: [CODE=php]<?php function translate($sentence,$languagefrom,$languageto) { $homepage = file_get_contents('http://translate.google.com/translate_t'); if ($homepage==false) {$homepage='';} preg_match_all("/<form[^>]+ction=\"\/translate_t\".*<\/form>/",$homepage,$botmatch); $botmatch[0][0]=preg_replace("/<\/form>.*/",'',$botmatch[0][0]); preg_match_all("/<input[^>]+>/",$botmatch[0][0],$botinput); $id=0; while (isset($botinput[0][$id])) { preg_match_all("/value=(\"|'|[^\"'])[^\"']+(\"|'|[^\"'])?( |>| )/",$botinput[0][$id],$tmp); $tmp[0][0]=preg_replace('/(('|")?[^'"]+)/','$1',$tmp[0][0]); $tmp[0][0]=preg_replace('/('|")/','',$tmp[0][0]); $tmp[0][0]=preg_replace('/.*value=/i','',$tmp[0][0]); $len=strlen($tmp[0][0]); $len-=1; … | |
Re: I'm not too sure as to what the second line should be but the first line should look as follows: [CODE=php]$urlres = preg_match_all('/<img[^>]+\>/i', $site, $matches);[/CODE] | |
Re: Without the line showing how the function is defined it is hard to tell but it looks like you are using a method as a function. A method is an oop thing that can be defined exactly the same way as a function but within a class with a constructor. … | |
Re: The mysql query you are looking for looks something like this [CODE]mysql_query("SELECT * FROM `tablename` WHERE `column_name`='value'");[/CODE] If you are new to this then I would strongly suggest following a few tutorials to do things like insert/update/delete data from a database and most importantly to select data from a database. … | |
Re: If you want the secure folder sessions to not be read from any other folder, then at the top of all your php files in the secure folder place the following code and it will make the session data in that folder only viewable within that folder. [CODE=php]<? session_name("srmcvkdoejh48fo4mnf8"); session_start(); … | |
Re: I checked the error in the attachment and SQL Admin should at all costs be disabled as it is so buggy and has so many memory clashes (at least on my version). Instead it is recommended that you use phpmyadmin which does exactly the same thing. Also phpmyadmin comes with … | |
Hi, I have been working on a simple command line program that will simply store my data in the code variable then submit that data to another program. Although I have the thory right, I don't understand why the middle double quote ( " ) seems to escape the quotes … | |
Re: Try changing your script to as follows as some of your variables were difined with the wrong name: [CODE=php]<?php /* Subject and Email Variable*/ $emailSubject = 'Email from Clients'; $to = 'tracyn2k2@yahoo.com'; /* Gathering Data Variables */ $name = $_POST['name']; $email = $_POST['email']; $phonenumber = $_POST['phonenumber']; $comments = $_POST['comments']; $body … | |
Re: [QUOTE=caperjack;783456]Download [b]Malwarebytes' Anti-Malware[/b] ([url]http://www.majorgeeks.com/Malwarebytes_Anti-Malware_d5756.html[/url]) to your desktop. * Double-click [b]mbam-setup.exe[/b] and follow the prompts to install the program. * At the end, be sure to checkmark the [b]Update Malwarebytes' Anti-Malware[/b] and [b]Launch Malwarebytes' Anti-Malware[/b], then click [b]Finish.[/b] * If an update is found, it will download and install the latest … | |
Re: Try this as your code: [CODE=php]$result = mysql_query("SELECT * FROM `member`"); while ($row = mysql_fetch_array($result)) { if(mysql_num_rows($result) == 0) { $result = mysql_query("UPDATE `member` SET `flgCurrent` = 'false' WHERE `idMember` ='" .$row[0]."'"); } echo $row."<br />"; } [/CODE] Also the logic in the if function just won't work. You have … | |
Re: [QUOTE=Andrieux]Windows has nothing to do with it, he's probably using WAMP or XAMPP, and doesn't know how to configure the .ini file. Google, my friend; Google. [/QUOTE] Hi and I have been having having the same problem with the mail function but yes I know how to configure and instantly … | |
Re: Well there is one possibility but that is depending on what the system restore did. If the system restore restored files at {installationdirectory}/mysql/data/ then you could place your old files in there and that might display in PhpMyAdmin but don't over-right any files during the process. That is all I … | |
Re: If you have php version 5 then use the following: [CODE=php]$html = file_get_contents("stuff.html"); echo $html;[/CODE] ![]() | |
Re: I have made a standard email form and is below. The only thing you need to change is the variable $address (about line 4) to your real email address to receive website emails. Also this email form supports html formatting. [CODE=php]<? if (isset($_POST['subject']) && $_POST['message']!=='') { $address = "your_real_email@domain.com"; //change … | |
Re: I am guessing the below code might work but I am not sure as you are reading from a variable and not a file. So try the following and if it does not work, you will need to use something simular but use the gd library/binary to allow the [CODE=php]list($width, … | |
Re: Transferring data to the https protocol is not as simple as it may seem. From what I have read, you will need to purchase ssl certificates (they are not cheap) and the entire website would be under the https protocol. A brief article about the certificates of the https protocol … | |
I have just started learning php-gtk 2 but am a bit stuck. First is that are there any php-gtk 2 debuggers or error loggers that I can use because at the moment, if there is a bug in my script, the exported exe file made from my php-gtk script is … | |
Re: Although I don't know anything about it there is a function called http_request(); and the official documentation can be found at [URL="http://php.net/manual/kr/function.http-request.php"]http://php.net/manual/kr/function.http-request.php[/URL] | |
I have been working on a function which creates a 1 million digit value of pi but php is treating a theoretical numeric variable as a string. Below is the code I used and for now I have put a small limit on the digits but it is line 22 … | |
Re: There was a simular post not long ago located at [URL="http://www.daniweb.com/forums/thread61688.html"]http://www.daniweb.com/forums/thread61688.html[/URL] However, it was mentioned in the link above that it is not free to send a sms from a website. You will need to subscribe to a provider that can provide you with php code for your website. An … | |
Hi and I am trying to embed a modified version of a javascript/css script from [URL="http://www.javascriptkit.com/script/script2/dbmenu/#"]http://www.javascriptkit.com/script/script2/dbmenu/#[/URL] but since have made a few problems. At the moment, my script is only compatible with Internet Explorer 7 (not compatible with earlier versions) and can anybody help me debug the top menu at … | |
Re: Why not do what is usually done in MS Word and make the letter o in superscript. So try the below code: [CODE=php]<? echo "It is 20<sup>o</sup>C."; ?>[/CODE] | |
Re: [CODE=html]<form method='post'> Username: <input type='text' value='' name='user'><br> Password: <input type='text' value='' name='password'><br> </form>[/CODE] Well there are 2 main easy ways that you can do the activation process. Assuming above is the form you allready have, then if you just want to check there is only a space used or no … | |
Re: Although cookies are useful for long-term storage, I find that people can so easily disable them making your site not work. That is why I have invented what I call server-side cookies. These are cookies all stored within a mysql database and a retrieved by the users ip address. To … | |
Re: It is because you are using the "file" protocole. When managing documents with php, use a relative path which does not breach apachies web root settings. So if your script is in the directory "C:/xampp/htdocs/example/test/index.php" and you want to unlink/delete a file in the web root directory then you would … | |
Re: When you setup the textbox fields, make sure they both have names and that their names are unique. So something like below is an example: [CODE=html]<form method='post'> <input type='text' name='box1' size=30><br> <input type='text' name='box2' size=30> </form> [/CODE] Then to retrieve those 2 fields and display them you would use the … | |
Re: if you are uploading through the browser then perhaps you have a html input field that is prevent the larger files from being uploaded. On most uploading examples you will see this is a line of code: [CODE=html]<input type="hidden" name="MAX_FILE_SIZE" value="100000" />[/CODE] (100KB file limit) But what you want is … | |
Re: If you are new to php, perhaps some simple documentation will explain the basics of php. For mysql, check out [URL="http://www.tizag.com/mysqlTutorial/"]http://www.tizag.com/mysqlTutorial/[/URL] and on the left side of the page are links to tutorials of each part of using mysql. Also you can get advanced documentation from [URL="http://www.php.net"]http://www.php.net[/URL] And if you … | |
Re: It means your page took too long to load and exceeded to time limit. Try setting the timeout in php.ini to zero for infinite timing or setting it to something like 99999 seconds. | |
Re: [QUOTE=througheye;736788]Hello Can anyone provide me a video tutorial about framework in web development field within php like how the file structure are organize in a framework,etc. Tutorial can be base upon oscommerc, zendcart, etc.This can be developing a web site . thank you.[/QUOTE] You may want to note that if … | |
Re: Live client side streaming with php... I wish. Since this sort of question keeps appearing, I shall explain. Php is only able to compile SERVER side code and can only send to the browser or user html, javascript, or css code. Other than that you would need to switch to … | |
Re: If it is just the permissions that you are worried about, you could probably just make the individual php files have your desired chmod such as 644 while cgi scripts in the same directory have a different chmod number. This should work or at least on the server I'm on … | |
Re: Using the include function is one way of doing it but another way of achieving seo friendly urls is using a htaccess file (if apachie enables the rewrite mod). To make it easier below is an example url that I'll explain below: [CODE]http://www.example.com/index.php?category=more_info&page=contact_us http://www.example.com/more_info/contact_us.html[/CODE] The first example url above shows … | |
Re: [QUOTE][CODE=php]$sql = 'staff.emp_no, staff.fName, staff.lName, event.event_date, event.timeStart, event.timeEnd, event.emp_no, event.agenda FROM staff, event WHERE staff.emp_no = event.emp_no AND event.emp_no = "$check_array" AND event.event_date = "$e_date" AND timeStart = "$s_time"';[/CODE][/QUOTE] Quotations inside quotations. That just returns the string of the name of the variable and not what the value of the … | |
Re: [QUOTE=Manuz;733994]Hi, The background will be blank only as the control is first going to the alert function ; You can do like this......... You have this alert and location inside two functions and call them when required...[/QUOTE] I will just rephrase that to make it much more clearer. "To show … | |
Re: Another thing you can do to reduce the space used is to use bicubic resize the make the images half the height and half the width but for large images this technique can use a lot of cpu when resizing them back with a bicubic resize unless you just use … | |
Re: If you are talking about the page it redirects to ([url]http://www.swoopo.co.uk/[/url]) then my answer is as below: As for the counters, Ajax or Java would have been used for the live changes (since the countdown counts up a bit when someone bids & displays a red box when someone bids). … | |
Re: If you want to keep your old script then try adding a visual validator where you enter the numbers/letters you see in a picture into a field to submit the form. All you need is to make a bunch of pictures and make one at random display and the value … | |
Re: Well generally chat applets/applications are done by client side software such as Java/Ajax. But if you want it to be done in php, it won't be the fastest and may cause extra cpu usage of the server if it is done by php. So to do it with php, you … | |
Re: Try the below code and adjust the mysql query accordingly to your database design: [CODE=php]$access=mysql_query("SELECT * FROM `table` WHERE `column name` = '1'"); if (mysql_num_rows($access)!==0) { //Insert here data they can only view if the mysql column value = 1 //You could also just place here "exit;" without the quotes … | |
Re: I did a bit of searching on the w3 website and found a javascript code which detects what browser you are using. So if it is javascript you are trying to use then the below code allows 2 separate codes to be used, 1 for Internet Explorer while the other … | |
Re: Why not do what php (Hypertext Preprocessor) was designed to do and make the php script to generate the javascript code which is then used by the browser. So you would make the php script to dump all the data into a large javascript code as arrays and every 10 … | |
Re: [QUOTE]I want the user to choose the quantity and pass the variable to my form, please help[/QUOTE] If you are meaning to setup another page/form which submits to this form the quantity then first the code you mentioned will need to be altered to the below: [CODE=html]<form method="post" action="https://pay.com/live/shop/add_to_cart"> Qty: … |
The End.