- Upvotes Received
- 10
- Posts with Upvotes
- 9
- Upvoting Members
- 7
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
144 Posted Topics
first create the table [CODE] create table images ( image_id serial, filename varchar(255) not null, mime_type varchar(255) not null, file_size int not null, file_data longblob not null, primary key (image_id), index (filename) ); [/CODE] the file to output the images to the browser [B]picsrc.php[/B] [CODE]<?PHP //detect if image is called … | |
Re: Your code looks fine. It appears your php or mysql has not been installed correctly. try using a differen connect function such as mysql_pconnect and re-install your php or mysql. f it is only that file just download that particular file and see if it works better. perhaps try a … | |
Re: Find the user Happygeek and pm him tutorials and over a few weeks or whatever they may eventually put thm in the tutorials tab :) | |
Re: I'll build a code for you can you tell me how you need this to display? I.E: if you want one drop box to change from another (AJAX), or just display one drop box from the database (while query) | |
Re: I assume your using a wysiwyg editor? So when the user types in <name> it is converted to <name> and your database might have a query like: $row = mysql_query($sql, $conn); which may get the rows $row['name'] and $row['address'] so that means you can use a string replace to insert … | |
Re: Hi!, I compiled a list previously on my website of my top 5 recommended hosts Check out http://www.metalix.co.nz/hosting/ What languages do you use? how big are your sites? | |
Re: really try to avoid posting data through the URL. remember guys that this can be bookmarked. and the session id can change each time and this compromises security if an old one and new one get mixed up. and you can use cookies and sessions together. but alot of people … ![]() | |
Re: Wow this is an old thread. include/include_once will just insert the code in the script. this will produce a warning if it dies (file does not exist) require/require_once will also insert the code but will result in a fatal error if dies. (script will terminate) | |
Hey guys, I know this will have an easy answer, but I have been awake far too long to see it :P I am doing some coding with classes in python, and it just isn't working. Here is the code: [CODE] from bpy import * from os import * from … | |
Re: I can't see any errors though you don't appear to have a mysql_select_db() above your query, and in your sql you can use VALUES ('$title', '$price' ...) instead of VALUES ('".$title."', '".$price."', ...) becase it is all wrapped in double quotes. try putting in select db above your queries. are … | |
View the full tutorial at [URL="http://www.effectivewebdesign.co.nz/tutorial.php"]http://www.effectivewebdesign.co.nz/tutorial.php[/URL] I have tested this many times and it works fine. Please don't complain unless you really can't get it working, Just PM me and I'll fill in the blanks Happy Coding :) | |
Hey guys!! been a while since I posted here, but thought I'd post this question here cause it is driving me insane!! Basically, if the condition returns true, then that part works. but if it's false, neither part works. If I put the content from the else after the <script> … | |
Re: It depends entirely on how you want to hide it. if people will be viewing your source, Then I use external classes that they cannot access, such as how the php pear system works | |
Re: Google knows all [URL="http://www.keyxl.com/aaacd5a/43/Notepad-Plus-text-editor-software-keyboard-shortcuts.htm"]http://www.keyxl.com/aaacd5a/43/Notepad-Plus-text-editor-software-keyboard-shortcuts.htm[/URL] | |
Re: Please show us the script so we can assist (blank any secure info) also is this something better done with javascript? | |
Re: They are different databases, if you use mysql you will use mysql_connect. or you can use mysql_pconnect to hold the connection, if you want it more secure throw in an @ symbol @mysql_connect() - this is so it won't display an error | |
Re: [CODE] <script type=text/javascript> function multiply(){ a = document.getElementById('prate').value; b = document.getElementById('thisqty').value; c = a*b; alert(c); } </script> [/CODE] Note the .value did this work? | |
Re: The methods are simply functions within your class, so they go within the first-child set of your class for example: [CODE] class myclass{ function __construct(){ } function getUserbyUid($uid{ //code here } ) } [/CODE] hope this helps :) | |
Re: It' seems the php is interpolating the image, is the colour in photoshop #808080? We all can't seem to re-create your problem, but maybe check your php file-system/ini file | |
Re: To find only the duplicates you should get the entire table, and use the mysql php code to just remove all that don't hit count 2+ (no doubles) | |
Re: Make sure you set all the width tags to be correct. else you can use styles td { width:300px; } | |
Re: You need to upload the file in a long-blob binary form, and use the mime-type when outputting. if i have time tomorrow I'll post some code | |
Re: Hi there Firstly I would recommend you seperate the code and species into different fields. otherwise it will take more coding, and take longer to process. However here is some code that should work: [CODE] <?PHP $conn = ''; //connection info $input = $_POST['input']; //the users input @mysql_select_db('database'); $sql_input = … | |
Re: Try this code I found a while back [CODE]function charset_decode_utf_8($string) { if(@!ereg("[\200-\237]",$string) && @!ereg("[\241-\377]",$string)) { return $string; } $string = preg_replace("/([\340-\357])([\200-\277])([\200-\277])/e","'&#'.((ord('\\1')-224)*4096 + (ord('\\2')-128)*64 + (ord('\\3')-128)).';'",$string); $string = preg_replace("/([\300-\337])([\200-\277])/e","'&#'.((ord('\\1')-192)*64+(ord('\\2')-128)).';'",$string); return $string; } echo charset_decode_utf_8('é');[/CODE] | |
Re: you will need to use substr(0,10) or regex to search for specific text ![]() | |
Re: The error is because when you post data, it is in a single string. the foreach needs an array. perhaps use an explode() on the input | |
Re: I think you are refferring to .htaccess? so as when you view the site it is an html, but it still uses server side processing | |
Re: Hey there. Firstly. when posting on forums you will usually get better response when you use kind wording. e.g: can any one help me with this code, rather than give me the code. and this is how it's done: [CODE] <script type="text/javascript"> function month(){ var date = document.getElementById('date').value; var curr_month … | |
Re: @ROB65MAC65 just have your submit take you to your form handling script which in turn will use a header re-direct when it has finished. @kuteinheart use ajax for this. there is a tutorial [URL="http://www.effectivewebdesign.co.nz/tutorial.php"]here[/URL] | |
Re: you will need to use php, or another scripting language for example [CODE] <div id="private"> <?PHP /* ?> Here is the secret html!! <?PHP */ ?> </div> [/CODE] the /* */ comment tags in php will stop the server outputting the code to the browser if your page is in … | |
Re: Hi there, Do you have experience with AJAX? You can have the select menu refresh from the ajax file. and the ajax file will use a while loop to select all the rows from the database based on the supplied input input might be: "ajax.php?map_from="+map_from+"&map_to="+map_to+"&content_from="+content; where -map_from can be country … | |
Re: I think AJAX is your answer. have a file that outputs a table based on the supplied input when the user changes the select menu this file is re-retieved and output in a div below the form, and when form is processed have javascript take the content from the div, … | |
Re: is this what you mean? [CODE]<script type="text/javascript"> <!-- var menu = new array(); menu['index'] = 'this is my home page'; menu['about'] = 'this is mypage about me'; --> </script>[/CODE] also please post javascript threads in the javascript section regards alex telford | |
Re: Is there a particular pattern to the replacement? Usually languages are based on sentence base translation, then word translation, then alphabetic translation, as this is the most reliable way, however you will need an extensive dictionary to cover the entire language, perhaps see if there is a prebuilt translator? | |
Re: Hi, You should use mysql_fetch_assoc instead of mysql_fetc_array This only returns the results in the row: [CODE] $result = @mysql_query("SELECT url, image, placement FROM advert WHERE user='1' ORDER BY placement"); $i = 0; while($process = @mysql_fetch_assoc($result)){ $row[$i] = $process; $placement = $row[$1]['placement']; $$placement['url'] = $row[$1]['url']; $$placement['image'] = $row[$1]['image']; $i++; } … | |
Re: Please be more descriptive of your issue, Perhaps AJAX or an iframe? eg: <iframe src="example.com" width="400" height="600" border="0" allowtransparency="true"></iframe> | |
Re: Ok, I have done this before. You will need a php class that: has a list of websites to search, will search particular pages for the given keywords will "click" the link to the returned content. will search the returned page for the image in question based on approximate size/surrounding … | |
Re: Personnally I built my own CMS using some functionality of [URL="http://www.freecms.com"]freecms.com[/URL] plus heavy mysql editing abilities. as i feel if i can't see what im doing within 30 seconds my clients have not alot of chance. so experience try using an ftp cms as you dont need to install anything … | |
Re: Usually they are the same. on all my websites sessions will easily transfer from [url]http://example.com[/url] to [url]http://www.example.com[/url] however specifying subdomains [url]http://sub.example.com[/url] won't work. maybe there is a problem setting up the site? | |
Re: a submit button takes the user to a new page, that is what it is supposed to do. you could use some javascript to post the data then open the lightbox. however your best bet is probably to use AJAX ![]() | |
Re: is actually 6 characters not one. use this [CODE] $data = str_replace(' ', ' ', $data) if(substr($data, 0, 1) == " ") { echo "Yes"; } if(substr($data, 0, 1) == "") { echo "Yes"; } [/CODE] | |
Re: I can't see any connect information you will need to connect to your daatbase at the top of the script, then select the database when making the query [CODE] //Connect to database $host="localhost"; // Host name $username=""; // Mysql username $password=""; // Mysql password $db_name=""; // Database name $tbl_name="members"; // … | |
Re: You need to add a WHERE statement to your query for example if the cat id is called by example.com?catid=14 [CODE] <?PHP $catid = $_GET['catid']; $catid = mysql_real_escape_string($catid); $sql = "SELECT cat_id FROM tbl_category WHERE cat_id = '$catid'"; //rest of code ?> [/CODE] | |
I know I am probably missing something small but I can't seem to get it running I need to send an html email for newsletters and on registration But it needs to be authorised so it doesn't get marked as spam or filtered. here is what I have so far: … | |
Re: if you are hosting the page yourself rather than with a company you need to install a mailserver on your machine | |
Re: well just use substr when you output it, $date = substr($input, 10); there will always be the same number of characters in the date, so this is probably the simplest "one liner" | |
Re: if its once every 24 hours it is probably done using cookies with a 24 hour timeout. or you can use sessions to do it 15min after they leave. its a little heavy on the database to use mysql i would recommend only using mysql to store the total views | |
Re: its not a greater or lesser statement. it is supposed to be => (the arrow operator) the problem is the $k and $v read the manual on parse_url [URL="http://nz2.php.net/manual/en/function.parse-url.php"]here[/URL] hopefully that helps :) | |
Re: you might want to use $_SESSION['user1'] and $_SESSION['user2'] or just use on login page [CODE] <?PHP $_SESSION['page'] = "demo1"; ?> [/CODE] on other pages [CODE]<?PHP if (!($_SESSION['user'] && $_SESSION['page'] == 'demo1')){ header("Location: index.php"); ?>[/CODE] or something like that | |
Re: Excuse the caps this is an old code but should still work fine :) [CODE] <OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" WIDTH="850" HEIGHT="610" CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0"> <PARAM NAME="MOVIE" VALUE="building.swf"> <PARAM NAME="PLAY" VALUE="true"> <PARAM NAME="LOOP" VALUE="true"> <PARAM NAME="QUALITY" VALUE="high"> <PARAM NAME="SCALE" value="noborder"> <EMBED SRC="building.swf" WIDTH="850" HEIGHT="610" PLAY="true" LOOP="true" QUALITY="high" scale="noborder" PLUGINSPAGE="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash"> </EMBED> </OBJECT> [/CODE] |
The End.