1,376 Posted Topics
Hi and I am having 2 technical difficulties with a web search engine I have created. One is that the search bot comes to a url and never stops loading. Below is the current script I use to validate a url and to capture the information but my question is: … | |
Re: I would suggest changing 'sample.js' to 'sample.php' then use sessions to transfer the value and echo the value into the file. A sample is as below and make sure the first line is exactly the same: [CODE]<? session_start(); ?> //to display the value in the javascript var variable=<? echo $_SESSION['variable']; … | |
Re: In my opinion, I would use the html answer. If you are meaning to open links in new tabs, just use the html code target=_blank. So to open links in the tabs (in browser without tabs - new windows) use: [CODE=html]<a href="link.htm" target="_blank">[/CODE] Also if you are using iframes or … | |
Re: [CODE=php] if (file_exists($fullpath)) {[/CODE] Also the above line of code is invalid due to what $fullpath variable contains. It is impossible to use url's in the file_exists. The file exist function is design for relative paths such as "../../../folder/file.php". For the answer, someone named justin at php.net has made a … | |
Hi and I must know if this script is valid to determine if the Java console and my Java compiler need reinstalling. I have tried so many samples and my browser shows an invalid message. My file is named 'filename.class' and below is the script I have used to test … | |
Re: The only way that I know how to make subdomains (other than using the servers control panel) is by editing the apache httpd.conf file which you may be able to program a php script to do if you have full permissions of the server. Guides can be found at [URL="http://apptools.com/phptools/virtualhost.php"]http://apptools.com/phptools/virtualhost.php[/URL] … | |
Re: I must ask about line 13. You used the function end(); which returns the value of an array between the brackets. If you want line 13 to end/exit the code, you must use the exit element or the code as showen below. [CODE]exit;[/CODE] So now lines 11 to 14 would … | |
Re: To detect if a file has a virus, you need to check its memory dump/stack. You can find all about the virus memory stack with a [URL="http://search.yahoo.com/search?ei=UTF-8&fr=moz2&p=virus+memory+%2Bstack&fr2=sp-qrw-orig-top&norw=1"]Yahoo Search[/URL] (the search term "virus memory stack" and click the link that tells yahoo the word stack is not stick) And at the … | |
Re: I have read your code and could I ask what version of php you have. Because this very same error keeps on being reported onto these php forums and nobody truly knows the answer. That is why I am now starting to study these T_variable errors on daniwebs to see … | |
Re: Although I am not entirely familiar with mysqli query's, I do know that there is a chance of the $email variable being embeded wrong. Below is the script and its replacement. [CODE=php] //Your script: $q = "SELECT uid FROM table WHERE email = '$email'"; //Above needs to be replaced with … | |
Re: [QUOTE]If so is this the correct syntax [CODE]$table = "abc"; $sql = "DELETE FROM $table WHERE *"; mysql_query($sql);[/CODE][/QUOTE] Below is the correct syntax: [CODE=php]$table = "abc"; $sql = "DELETE FROM `".$table."`"; mysql_query($sql);[/CODE] | |
Re: If you are talking about using html meta tags in php then use the following (assuming you are placing it in the middle of your existing code: [CODE=php]echo "<META name=\"something\" content=\"something else\">";[/CODE] Notice I put the backslash before each quotation mark in the html code. That is because of the … | |
Re: [QUOTE]move_uploaded_file($_FILES['pic1']['tmp_name'], 'pics/picture.jpg'); Repeating this three times (with pic2, pic3, pic4) doesn't seem to work.[/QUOTE] The reason why that didn't work is because the array ['pic1'] refers the the name of the file browse field in your html form. So what you put in 'pic1' should be the same as what … | |
Re: Well it seems your only option is server side cookies as I call (an invented) them. Although I don't know how to code this with sessions but I will explain the theory. If you set up a Mysql database with 2 columns that will hold all of the session id … | |
Re: I have gathered the below script from the official documentation at: [url]http://au2.php.net/manual/en/function.session-destroy.php[/url] [CODE=php]<?php session_start(); //must be at beginning of page //in here is any miscellaneous logout data such as mysql scripts. //Below destroys the session $_SESSION = array(); if (isset($_COOKIE[session_name()])) { setcookie(session_name(), '', time()-42000, '/'); } session_destroy(); ?> [/CODE] So … | |
Hi and I have a localhost server with Windows XP Pro and the Xampp server package but what I need is something to monitor the servers speed and performance. This includes CPU, ssl/php execution time, memory used and similar functions. Does anyone know where I could find such a program … | |
Re: Believe it or not this is just barley possible to do with php (and a little html). What you need to do is setup an iframe and make the link submit to the iframe with a url variable. Then when the iframe reloads, it gets the url variable and assigns … | |
Re: [QUOTE][CODE]Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\xampp\htdocs\globals\functions.php on line 35 The username and password provided did not match.[/CODE][/QUOTE] The error you have mentioned is from my experience, has always been the result of an invalid Mysql query. And I would say that your Mysql … | |
I have made a PHP script which takes days to execute (Web Article Generator) and is there any way that I can make the while loops do more Instructions Per Second using php. Because when executing the script, the servers resources are very low (15% memory & about 9% of … | |
Re: I have had to do similar things in the past and I find division and rounding to be the answer. An example is as below: [CODE=php] $loop=0; while ($loop<=100) { $val=$loop/10; if ($val==round($val)) { echo ($i % ($amount / 10) == 0) ? "<div class=\"load\"></div>" : ""; } $loop+=1; } … | |
Re: Found your problem which I had too when I did my first GD script the last line is incorrect as it has an unsigned variable within the function. [CODE=php]imagepng($image_e,'aa.png',0);[/CODE] So replace the above with below [CODE=php]imagepng($image_p,'aa.png',0);[/CODE] Notice the letter 'e' in the first box and the letter 'p' in the … | |
Re: Although I don't 100% understand what you are requesting, I shall give you a script which shows how displaying the results. This however takes the knowledge of mysql querys, php and html lists. [CODE=php] //$_POST['term1'] is first posted search variable //$_POST['term2'] is second posted search variable //$_POST['term3'] is third posted … | |
Re: Below is a script I made which will delay the page by 2 seconds however, although the page will be processed with the delay, you may find that the whole page may display at the same time (after 2 seconds). [CODE=php]<html> <body> <?php $oldseconds=date(s); if ($oldseconds==58) { $newseconds=='00'; } else … | |
Re: Have you checked if cookies are enabled in Firefox because to use sessions you need the session ID which is usually stored in a cookie. If you haven't got cookies enabled in Firefox then try enabling them and see if that makes the sessions work. ------- Also if it does … | |
Sorry if this is in the wrong forum but I couldn't find a Flash forum so I am just guessing from previous posts that this is the right forum for the programming side of Flash. A few months ago I got a flash program called '3D Flash Animator' but comes … | |
Re: [QUOTE]So the line in the middle of the example above is basically telling the server to 'get' the variable 'nflag' from the url bar and to echo/display it. From: http://www.daniweb.com/forums/thread147753.html[/QUOTE] You may want to check the reply I made on your previous post. The array $_GET[] basically just tells the … | |
Re: The best way to pass short variables such as a page title is using url variables so use the following code: First page before redirect. [CODE=php] // Note it redirects to a php page. echo "<meta http-equiv=Refresh content=0;url=login.php?nflag=".$nflag.">"; [/CODE] Login.php page [CODE=html] <? $nflag=$_GET['nflag']; ?> <html><body> The variable passed on … | |
Re: Below is a sample of a form using preview and submit if it helps. [CODE=php] <? if (isset($_POST['submit'])) { //form submission data } ?> <html><body> <form method='post'> <textarea cols=50 rows=12 name='formtext'><? echo $_POST['formtext'] ?></textarea> <input type='submit' value='submit' name='submit'> <input type='submit value='preview' name='preview'> </form> </body></html> <? if (isset($_POST['preview'])) { echo $_POST['formtext']; … | |
Re: Although I don't know about overwriting the image what I would do is to first submit the image to a temporary location. Then the script can read the file from that temporary location and create 2 new files each with there own sizes. Then you simply use the unlink function … | |
Re: [QUOTE]There is no way to hide HTML or JavaScript code from the user, these are client-side scripts and will need to be processed by the client browser, as such the code will need to be sent and can be viewed.[/QUOTE] Although that is true, there are still 2 options on … | |
Re: [QUOTE]when user select his unit corresponding value again fetch form mysql and fill to other combobox but onchange() my browers url change [url]http://localhost/MIS/PS/add/add_ps2.php[/url] and other combobox value are not fetching form mysql. i make a function sel() <document.form.submit()> onchange combobox item.but problem is not solving please help me form rohit[/QUOTE] … | |
I have seen on the news about new technology called exitreality. Also I have also seen examples of the new technology at [URL="http://www.exitreality.com/"]http://www.exitreality.com/[/URL] where you can have 3D websites but how can I add the 3D objects to my website. I have searched their website and found no language documentation … | |
Re: Try replacing it with the following: [CODE]$query_rs_listings = "SELECT `listings.Id`, `listings.town`, `listings.mkt_area`, `listings.list_price`, `listings.address`, `listings.ml`, `listings.list_office`, `listings.list_office_phone`, `listings.property_type`, `listings.baths`, `listings.bedrooms`, `listings.square_feet`, `listings.acreage` FROM `listings` WHERE `listings.property_type`='".$_GET[property_type]."'";[/CODE] The 2 things I did to the script was I added the appropriate types of quotations marks around each piece of text and I … | |
Re: Unless the variable is not posted in the url bar when clicking the link, I would say the bug is in a mysql query inside the news.php page. So when you click the link that leads to your (currently) blank article, is the identity/variable in the url bar? If it … | |
Hi and I am expanding one of my websites which requires me to write a script which has a language syntax highlighter (the gml/gamemaker language). So to do that I am using mainly preg replace and str replace. I have been working hard at it for the last 29 hours … | |
Re: This sort of account error happens to me at least once every 15 months. The only way I know of around it is to load up the computer in a different account and create a new user account. So when you go into 'safe mode' (as described above), you then … | |
Re: [QUOTE]you cannot test mail on your localhost try it from a free web server, like [url]www.111mb.net[/url][/QUOTE] That is totally wrong and you don't even need internet to test email scripts with php. All of the answers to this topic can be found on a search term such as 'xampp'. xampp … | |
Re: Well first to help you understand it more, the phrase IRQ means 'Interrupted Request' and I would say the letter L that follows that would be short for 'Leak' meaning that there is an interrupted program request due to a memory leak. This could be because of two reasons. One … | |
Re: Although this is not a common problem and most would disagree that this problem exists, there is a slight incompatibility (from my point of view) with some versions of MySQL scripts. This is because in some later versions of MySQL (like you have possibly switched) there is a thing with … | |
Re: I have just completed a login system for a php site and although it is not open source I will tell you how it works. So for beginners, you will need to know the following: Making sessions [URL="http://www.tizag.com/phpT/phpsessions.php"]http://www.tizag.com/phpT/phpsessions.php[/URL] [URL="http://au2.php.net/session_start"]http://au2.php.net/session_start[/URL] Making HTML Forms The isset($_POST['variable']) command MySQL querys PHP Variables And … | |
I have been working on a php login system which is basically finished but needs one thing cleaning up. When the session is created/registered, a cookie is created. And according to firefox, the cookie will expire when the session ends. However, the session ends (according the the rest of my … | |
Re: [QUOTE=nav33n;640466][code=php] $query = "SELECT * FROM freeboard where is_comment = 0 order by thread desc"; [/code] Notice that I have removed unwanted [b]'[/b].[/QUOTE] If MySQL 5.* is being used then it is most likely you have this all wrong. This is because on some servers, MySQL 5 requires the apostrophe … | |
Re: Simply use an if function. Try the following: [CODE=php] echo "<form ...>"; // Just to show the form has started if (unset($_POST['disableoptiona'])) { //replace the below line with the radio button within the echo ""; function echo "<input type=radio name=whatever>"; // the below line needs to be copied exact if … | |
Re: If the recycle bin software is currupted then try the following. Open my computer from the desktop. Then at the top of the window you will notice a wide bar like the address bar in a webpage. Select everything in it and type: C:\Recycled Then press the enter key. After … | |
Re: A few weeks ago I was in the same situation and I would recommend the following books: [LIST] [*]PHP MySQL Web-Development All-in-One-Desk-Reference For Dummies [*]PHP5 and MySQL Bible / By: Tim Converse and Joyce Parks, with Clark Morgan. [/LIST] Also the following google search term: [I]site:[url]www.php.net[/url] mysql[/I] Note that the … | |
Re: If alignment of the image wont work, why not make a barrier around the image. An example is [code=php] $imgwidth=64; //Image width $imgheight=64; //Image height echo '<tr id="divider"><td> <table border=0 cellpadding=0 cellspacing=0 width=$imgwidth height=$imgheight align=left> <tr><td> '.$row['profileimg'].' </td></tr></table> '.$row['username'].'</td></tr>';[/code] The above is just from the top of my head so … | |
Re: First make sure that account has been through the setup wizard. To do this just open Exel from the start menu or desktop. Then a installation wizard may appear. If it does then follow the prompts else you may find that the account settings have been messed up. To solve … | |
Re: Another thing to add to the previous post is sometimes Microsoft ads the key on the plastic raper that most people would just put in the bin. So try finding every bit that came with the box as the key can be hidden in all sorts of places. | |
I have been programing a php online bot with an admin panel. It mainly works good an all but my forms are double posting. So the way I have designed the form is that the user enters the data. Then clicks the submit button which sends the data to MySQL. … | |
Re: 2 ways but I'm not sure if they both refer to the same type of SQL databases. The first one is: [CODE=php] $linkID = @mysql_connect($dbhost,$accountname,$password) or die("Could not connect to MySQL server"); @mysql_select_db($database) or die("Could not select database"); [/CODE] And the second is MySQLI and I think might be as … |
The End.