1,376 Posted Topics

Member Avatar for cwarn23

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"}; …

Member Avatar for cwarn23
1
353
Member Avatar for arushibafna

[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 …

Member Avatar for arushibafna
0
123
Member Avatar for wayz1229

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 …

Member Avatar for wayz1229
0
102
Member Avatar for The Dude

[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 …

Member Avatar for cwarn23
1
97
Member Avatar for Bob_180_Bob

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 …

Member Avatar for kaninelupus
-2
161
Member Avatar for elanorejoseph

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.

Member Avatar for elanorejoseph
0
75
Member Avatar for panam72
Member Avatar for shishtawitch

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 …

Member Avatar for cwarn23
0
70
Member Avatar for crohole

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 …

Member Avatar for leahmarie
0
108
Member Avatar for samarudge
Member Avatar for santiagozky
0
202
Member Avatar for cwarn23

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 …

Member Avatar for mwasif
0
239
Member Avatar for cwarn23

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 …

Member Avatar for cwarn23
4
648
Member Avatar for BestJewSinceJC

[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 …

Member Avatar for cwarn23
0
392
Member Avatar for u8sand

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"; ?> …

Member Avatar for venkat0904
0
133
Member Avatar for GrimJack

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.

Member Avatar for cwarn23
0
149
Member Avatar for akvlko

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') { …

Member Avatar for akvlko
0
196
Member Avatar for cwarn23

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 …

Member Avatar for BestJewSinceJC
0
220
Member Avatar for Ancient Dragon

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 …

Member Avatar for Dave Sinkula
0
490
Member Avatar for mike14

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, …

Member Avatar for network18
0
276
Member Avatar for praveen_dusari
Re: bug

[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 …

Member Avatar for cwarn23
0
84
Member Avatar for bonzi200x

Although I'm no fan of oop I would suggest posting line 395 and code that relates to line 395 for us to debug.

Member Avatar for cwarn23
0
110
Member Avatar for tsr.linkan

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 …

Member Avatar for cwarn23
0
81
Member Avatar for syncy

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]

Member Avatar for syncy
0
428
Member Avatar for kira4

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.

Member Avatar for kira4
0
103
Member Avatar for cwarn23

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 …

Member Avatar for somedude3488
0
101
Member Avatar for csharplearner

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 …

Member Avatar for sarithak
0
103
Member Avatar for The Dude

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.

Member Avatar for Wasser
0
168
Member Avatar for crohole

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, …

Member Avatar for cwarn23
0
152
Member Avatar for justted

[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 …

Member Avatar for jackiboa
0
567
Member Avatar for cwarn23

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 …

Member Avatar for mahgobb
0
138
Member Avatar for cwarn23

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. …

0
140
Member Avatar for arindamtech

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 …

Member Avatar for cwarn23
0
73
Member Avatar for nadnakinam

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"; // …

Member Avatar for cwarn23
0
134
Member Avatar for vidhyaponnusamy

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]

Member Avatar for network18
0
89
Member Avatar for deepika1

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.

Member Avatar for leviathan185
0
61
Member Avatar for cwarn23

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 …

Member Avatar for jbennet
1
194
Member Avatar for slucia

Also don't forget to try the [URL="http://au2.php.net/manual/en/function.imap-mail.php"]imap_mail()[/URL] function.

Member Avatar for hawk17
0
115
Member Avatar for smvec

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.

Member Avatar for network18
0
103
Member Avatar for cwarn23

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 …

Member Avatar for cwarn23
0
224
Member Avatar for hyderabadi

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 …

Member Avatar for cwarn23
0
135
Member Avatar for lllllIllIlllI

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. …

Member Avatar for cwarn23
-1
98
Member Avatar for sbhavan

[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 …

Member Avatar for sivashins
-1
273
Member Avatar for cwarn23

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 …

Member Avatar for cwarn23
0
177
Member Avatar for mrcb

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]

Member Avatar for codejoust
0
88
Member Avatar for CFROG

[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 …

Member Avatar for cwarn23
0
173
Member Avatar for coolmind259

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.

Member Avatar for cwarn23
0
246
Member Avatar for MikeGore

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">&nbsp;</td></tr> <tr><td colspan="2" align=center></td></tr> <tr><td colspan="2">&nbsp;</td></tr> <tr> <td class="normaltd" style="vertical-align:top;"> </td> …

Member Avatar for diafol
0
143
Member Avatar for rajeesh_rsn

[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 …

Member Avatar for rajeesh_rsn
0
327
Member Avatar for mrcniceguy

A quick google search would find you some websites. The first result was [URL="http://www.joomlatutorials.com/"]http://www.joomlatutorials.com/[/URL]

Member Avatar for guru12
0
81
Member Avatar for cwarn23

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 …

Member Avatar for digital-ether
0
378

The End.