1,376 Posted Topics
Hi and I have been working on a simple problem but can't seem to find any solution and have tried browsing the net. My question is how do I append to an array. Below is the code I tried but still doesn't work. [CODE]String[] names={""}; if (charcheck1==true) { String[] chartmp={"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"}; … | |
Re: [QUOTE=evstevemd;1048116]I don't recommend XAMPP, though it is good once you get used to it! I recommend WAMP, it is elegant and Good. Also check your PHPMyAdmin to browse your databases[/QUOTE] I would have to say if you managed to get XAMPP working then good, keep it as XAMPP has a … | |
Re: Try the following: [CODE=php]<?php require_once('config.php'); for ($i=1;$i<11;$i++) { $aid='aid'.$i; $$aid=$_POST['Question-'.$i]; $qid='qid'.$i; $$qid=$_POST['qid'.$i]; $query = 'UPDATE answers SET acount = acount + 1 WHERE aid = "'.mysql_real_escape_string($$qid).'" AND qid = "'.mysql_real_escape_string($$qid).'"'; mysql_query($query) or die("ERROR: $query. ".mysql_error()); } mysql_close(); ?>[/CODE] I haven't tested it for bugs and yes those variables with two … | |
Re: [QUOTE=firstPerson;1046946]Wow. Imagine how much process a game could save by using this technique.[/QUOTE] There was a game ("Duke Nukem 3D Atomic Edition") that sorta used that technique or at least the users said so which made the First Person Shooter 2.5 dimensional. I don't see how that it is possible … | |
Re: This thread just has no direct answer so I shall help explain to Bob [QUOTE]Just a technical question on what is legal and what is not. I buy a printer, lets say a cannon, and after a while the black ink runs out, can I legally refill the cartridge as … | |
Re: I did a simple script and found that was not the case. [CODE=php]<?php $a=5; $b=$a; echo $$b; ?>[/CODE] Found that $$b will be blank because it will search for the variable $5 and it is impossible to make a variable with that name. | |
![]() | Re: Can you post lines 1 to 6 so we can see the true error. |
Re: This is impossible to do on most hosts unless you have root access or you use a wildcard subdomain. Htaccess files are not able to do this so to accomplish the creation of a subdomain there are two ways of doing it. First way is to create a subdomain just … | |
Re: I suspect it is because when you use the http:// or even the www. it forces the search engine to only check for backlinks containing that prefix. So if for example the backlink did not contain the full http:// in the url then it would not show up in the … | |
| |
Hi and I have been working on a project involving a rather large database. My question is "For a database with over 20529860 rows, is it better to have 3330 tables spreaded equally or to split into multiple databases or would it be better to have 49950 tables in the … | |
Hi and I am planning to make a bunch of tutorials. I would like to hear what sort of php/ajax tutorials people would like to see. I have heard in the past that some noobs would like a tutorial on making a blog. What else should I write tutorials about … | |
Re: [QUOTE]because now new members won't be able to post with the other tags[/QUOTE] Yes however I use to use code tags with no syntax a lot for non-code text and now old posts like the many I've posted are highlighted in code when they are just important text. There are … | |
Re: Try making this default.php [CODE=php]<?php // Start the session session_start(); if (empty($_SESSION['Username']) || !isset($_SESSION['Username'])) { $_SESSION['Username'] = ""; $_SESSION['Access'] = 0; } ?> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title>Website</title> </head> <body> <table width="100%" height="100%" border="0"> <tr height="1%"> <td> <?php require "menubar.php"; ?> </td> </tr> <tr height="10%"> <td> <?php require "logo.php"; ?> … | |
Re: If you are looking for a security camera then use the below search term: [CODE]intitle:"Live View Axis"[/CODE] Found a shop robbery on one of those cameras once and saw the footage again on TV lol. | |
Re: I managed to piece together a simple script that will display the names of each person in the result. However the database design is not how I would design it but the following script will do the job with only a few fields not being active. [CODE=php]<?php if ($_POST['submit']=='Search') { … | |
Is it just me or is daniweb hard to reach latley? Today I've been bumped off daniweb as the site froze and wouldn't respond and to site has sometimes been slow to respond when working. The first time this happened there was just a white page then eventually a message … | |
Re: I agree kinda agree. Although it would be nice to see a second tag with mono spacing and no syntax highlighting for quick use I think it would make the average quote look not so good. So perhaps instead if another tag was added which made the text in monospacing … | |
Re: Arr - ain't code tags meant to be used for code. As for the question assuming it's not code, php has a cool function called [URL="http://au2.php.net/manual/en/function.mysql-query.php"]mysql_query()[/URL]. With this function it is possible to insert and retrieve data from a database and to use it as something like a xls file, … | |
Re: [QUOTE] but I can't seem to figure out why it is periodically doing this on-and-off[/QUOTE] Perhaps it's part of the update process where when the data is being updated in the database, first the new names are being added to the database then a person downloads a copy of the … | |
Re: Although I'm no fan of oop I would suggest posting line 395 and code that relates to line 395 for us to debug. | |
Re: If you are trying to use php on your local computer (localhost) then it sounds like at the moment your doing it the hard way. I would suggest not installing apache and instead install WAMP. Alternativley there is XAMPP but XAMPP is a bit buggy at the moment. The package … | |
Re: If you are talking about grabbing the youtube links from a page the following scripts will do that and display each video id in a list. [CODE=php]<?php $input=file_get_contents('http://www.youtube.com/'); preg_match_all('#(http://www.youtube.com)?/(v/([-|~_0-9A-Za-z]+)|watch\?v\=([-|~_0-9A-Za-z]+)&?.*?)#i',$input,$output); foreach ($output[3] AS $video_id) { echo $video_id.'<br>'; } foreach ($output[4] AS $video_id) { echo $video_id.'<br>'; } ?>[/CODE] | |
Re: You may want to note that for assigning a possibly undefined variable or array index/key the following is the correct method. [CODE=PHP]$PK = (isset($_POST['PK']))?$_POST['PK']:'';[/CODE] The above is what line 24 should be. | |
Hi and I have learned 2 ways of making a php cms both with simular results on the client side. That is, is it best to have all pages pointed to index.php with mod rewrite and url vars or is it best to have a couple dozen php files each … | |
Re: Well actually I would use htmlentities() to prevent any html from going into the database and at the same time use mysql_real_escape_string(). To help explain below is an example code for a youtube clip: [code]<object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/vWF4x01MkzE&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/vWF4x01MkzE&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object>[/code] However … | |
Re: I got 2 of 3 the first time because I am used to the scientific color scale. But nice questions with only 5 seconds to answer each one. | |
Re: I am checking some of the other search engines but bing appears to be not so easy to find the back links with php do to a lack of feature. A discussion about how to find the bing back links without php can be found at [URL="http://www.ozzu.com/bing-forum/how-check-backlinks-bing-t100347.html"]http://www.ozzu.com/bing-forum/how-check-backlinks-bing-t100347.html[/URL] As for msn, … | |
Re: [QUOTE=justted;800890] My first quesion is regarding the PUBLIC_HTML folder and the use of PHP scripts and MySQL. Am I correct in saying that any file within the public_html folder is basically open to attackers. For example ...say I have a registration script where members can register on my site. The … | |
After gathering some information in the community feedback I have found that some people wouldn't mind having a Flash/Action Script forum. This thread is for to both suggest and debate about this as well as having a 3D modeling forum. Does anybody feel these two forums are appropriate for daniweb … | |
I have been using web browser for many years now (Firefox, Internet Explorer, Opera, Crome, Safari) and with heavy use of the internet, I have found that all of those browsers except Opera crash after the first few hours of having 20 tabs open with them constantly opening and closing. … | |
Re: Another tutorial to write about. This problem can be caused by using a text editor that adds invisible junk code at the beginning of the text file. First replace your code with the following: [CODE=php]<?php session_start(); ob_start(); ?>[/CODE] Then save it and reopen in windows notepad. Yer that old fashion … | |
Re: Your links are all pointing to the wrong location and should be something like as follows: [CODE=php]<?php //REMEMBER TO CONNECT TO DATABASE! $show_all=$_POST['rg01']; // Show All //echo $show_all; $host="localhost"; // Host name $username="root"; // Mysql username $password=""; // Mysql password $db_name="accounts"; // Database name $tbl_name="login"; // Table name $tbl1_name="details"; // … | |
Re: The following will do the job and I have even debugged a php timezone problem in this script. [CODE=php]if (ini_get('date.timezone')=='') { ini_set('date.timezone','Europe/London'); } date_default_timezone_set(ini_get('date.timezone')); echo 'Current time: '.date('h:i:s').'<br>'; //current time echo 'In 10 Minutes:'.date('h:i:s',strtotime('+10 minutes')); //future time[/CODE] | |
Re: During the logout process (before new begins to load) add the following code: [CODE=php]$_SESSION=array();[/CODE] That should flush the sessions data so the session will be empty after that point/line. | |
Hi, I have tried to view my private messages (pm's) and although at the top of the screen it says I have 42 messages I can only view 2 messages. The first message and the last I can view. Could somebody fix this as I like to occasionally read my … | |
Re: Also don't forget to try the [URL="http://au2.php.net/manual/en/function.imap-mail.php"]imap_mail()[/URL] function. | |
Re: Well try adding the following line just before the mail function to see if the address to is being stored properly. [CODE=php]echo '<h1>'.$to.'</h1>';[/CODE] It should display the email address and if it doesn't then your problem is that the variable $mail hasn't got any email address assigned. | |
I've noticed that there has been a change in the way reputation points are displayed. I have a suggestion about how they are displayed so that it looks better. When viewing the list of forum threads, to the left is the reputation number beside the topic. But it can look … | |
Re: It means that php cannot establish a connection with mysql. I see your using mysql remotely so make sure you enabled remote mysql on the server your connecting to. And in this configuration you will need to allow the remote domain + subdomain. Then make sure your username and password … | |
Re: Well to find out you should check your profile under the reputation section to see how much reputation modification power you have. Because different members effect other members reputation more strongly than others. I think it's based on how much reputation you have received and how many posts you've made. … | |
Re: [QUOTE=Rashakil Fol;983578]I thought we were talking about programming languages.[/QUOTE]Aren't web languages also programming languages or do you disagree? My favourate desktop application languages include PHP-GTK, Java and GML (Gamemaker Language). On the web side of things my favourites are HTML, Javascript, Java, PHP and Ajax. My not so favourites but … | |
I've been seaching and googling for an answer that I just can't find. I have a vps account with no nameserver and have been told I need to make the nameserver myself. Does anybody know of any good tutorials or could explain how to setup the nameservers. I have already … | |
Re: Try making this your second page and see if any header errors are reported when the cookies are set. [CODE=php]if($count==1){ setcookie("user", $myusername, time()+3600);//sets our user cookie setcookie("pass", $mypassword, time()+3600);//sets our pass cookie //header("Location:../index_pinit.php"); } else { header("location:../oops.html"); }[/CODE] | |
Re: [QUOTE]A well-designed form with good validation should stop most hacks, but forms and http post headers can be faked. There are some methods to block these - Google them. Although client-side validation will block most bad entries, server-side validation is essential.[/QUOTE] Well actually $_POST is no more secure than $_GET … | |
Re: I checked your site and when viewing it, the page is almost a Megabite in size. I would suggest using the flush() function immediately after every javascript file is included. | |
Re: The first file is basically html and most of it is converted to the following: [CODE=php]<?php include('include/splitSlot.ascx'); ?> <head> <title>City UDS: Schedule Game</title> </head> <tr><td class="pagetitle">City UDS: Schedule Game</td></tr> <tr><td class="pagesubtitle">Project ID <%=objProj.projectName%> </td></tr> <table cellpadding=0 cellspacing=0 border=0> <tr><td colspan="2"> </td></tr> <tr><td colspan="2" align=center></td></tr> <tr><td colspan="2"> </td></tr> <tr> <td class="normaltd" style="vertical-align:top;"> </td> … ![]() | |
Re: [QUOTE=rajcpn;999499]dear i m rajneesh do u have any idea to make php based login form[/QUOTE] First let me say welcome to daniweb. And when posting new questions in future, please post a new topic unless they relate to a recent topic which in this case it does not. At least … | |
Re: A quick google search would find you some websites. The first result was [URL="http://www.joomlatutorials.com/"]http://www.joomlatutorials.com/[/URL] | |
I have written a dehasher and the first 446000 rows in the mysql database have turned out ok but now my script isn't placing the entries into the database in order and is taking like a minute per entry to do it. Does anybody know what is wrong with the … |
The End.