208 Posted Topics

Member Avatar for Borzoi

Hello everyone, If I was to set my site to redirect any subdomain to the main page in the htaccess file like so: [code] RewriteCond %{HTTP_HOST} ^(.*).example.com RewriteCond %{HTTP_HOST} !^www.example.com [NC] RewriteRule ^(.*)$ http://www.example.com/ [P] [/code] Would this mean that if I was to type in elephant.example.com it would redirect …

Member Avatar for Borzoi
0
274
Member Avatar for iamthwee

The riddle stated that the man saw a rabbit, it didn't tell us that it was. It's possible that the moonlight and shadows, along with his hunger made him think he saw a rabbit when it was actually something else. I did think it might be his family somehow but …

Member Avatar for diafol
1
390
Member Avatar for cwarn23

[QUOTE=cwarn23;1371349]Then I would need a very long cable on my mouse and keyboard if I have one.[/QUOTE] There will be no such thing as cables in 2020. Ways to charge batteries wirelessly are already in research and development. Could easily stick those "charging stations" into lampposts and at bus stops …

Member Avatar for happygeek
0
155
Member Avatar for equatorlounge

Consistent code and layout Everyone lays out their code differently. There is technically no right or wrong way to lay it out as long as the syntax is correct but you should be consistent along the whole document. Here are a few ways I've seen people coding: [code=CSS] .class { …

Member Avatar for Borzoi
0
148
Member Avatar for d3n1se

For inline text, you should use [icode]<span>[/icode] instead of [icode]<div>[/icode]. They are pretty much the same except [ICODE]<div>[/ICODE] is naturally a block, with a line break before and after whereas [ICODE]<span>[/ICODE] is inline with no line breaks. Try using a [ICODE]<span>[/ICODE] and see if that works.

Member Avatar for d3n1se
0
106
Member Avatar for stonest123

Just so you know, you aren't closing your form tag in the first page. I don't believe you can POST the value of a button. It would probably be better to have a check box saying "include responsible?" before the "Submit" button.

Member Avatar for stonest123
0
154
Member Avatar for benhowdle89

I think your error is with your date variables: [code=PHP] $datef = date("Y-m-d",mktime(0, 0, 0, $_GET['year'], $_GET['month'], $_GET['day'])); $datel = date("Y-m-d",mktime(0, 0, 0, $_GET['year1'], $_GET['month1'], $_GET['day1'])); [/code] Are you getting any error messages or is it just not grabbing anything from the database? I've just made a guess at what …

Member Avatar for monica singh
0
107
Member Avatar for snehalj

Is the filepath to the image file correct? Could you provide us with an extract of the code which isn't working?

Member Avatar for Borzoi
0
184
Member Avatar for freestyler103

Could you provide us with the part of code which is supposedly having the problem please? We will be able to help a lot more if you could. Censor any passwords within the code and anything else that you don't want us seeing.

Member Avatar for smantscheff
0
254
Member Avatar for jonasjo

You've said you have an error but you haven't stated what the problem is. Could you also please wrap your code in code-tags.

Member Avatar for ko ko
0
176
Member Avatar for ceeandcee

You're adding the same value over and over again [icode]$row['Team'][/icode] Assuming each team has their own names (Team1, Team2, Team3 etc) then you could try this: [code=php] $div_GP=$ttl_GP[$row['Team1']]+$ttl_GP[$row['Team2']]+$ttl_GP[$row['Team3']]+$ttl_GP[$row['Team4']]; [/code] All I've done is add numbers to each.

Member Avatar for ceeandcee
0
101
Member Avatar for jackparsana

If you want the default colour of all text on the page changed, put it in the body section instead of a class: [code=CSS] body { color: #hexval; } [/code] Replace hexval with the hexadecimal value of the colour you want.

Member Avatar for Borzoi
0
160
Member Avatar for ibshas25

One way is to have something in the database stating their user level (user, admin, moderator etc) then write a simple query to check that and display only the options available to them.

Member Avatar for Stefano Mtangoo
0
84
Member Avatar for Borzoi

I am planning on getting a new computer soon with a 64bit version of Windows 7 Home Premium. The whole computer will be custom built by myself and I will be getting each part separately. What I want to know is this: If I put my current computer's hard drive, …

Member Avatar for Xlphos
0
155
Member Avatar for hyper_boom

You could use an if statement to check the URL. I assume your live version will have www. at the beginning. If not, replace it to whatever the start of the URL for the live site is. [code=html] <script language="javascript"> if (location.href.indexOf("www.google.com") == -1) { document.write("<div id=\"footer\">You are using the …

Member Avatar for hyper_boom
0
168
Member Avatar for rue...

All you need to do is update the field. Assuming your stock levels are labelled "Stock" in the database and the items are labelled "item": [code=php] <?php /*After obtaining the stock level from the database and putting it into the variable $stocklevel and placing the amount just bought into the …

Member Avatar for Borzoi
0
96
Member Avatar for Pukhraj.Jain

According to the properties of the page, it's written in plain text and not HTML. Make sure that the file extension is a valid html extension such as .html or .php. What is the current file extension?

Member Avatar for Borzoi
0
26
Member Avatar for niths
Member Avatar for star_lavender

You would have the drop down box as a form with a "submit" button which would redirect to the page with this query on. You would then use $_POST['dropdown'] to get the value of that dropdown box. Form page: [code=HTML] <!--Replace results.php with your results page--> <form action="results.php" method="post"> <select …

Member Avatar for Borzoi
0
139
Member Avatar for Borzoi

I haven't done any C++ programming for quite a while now and the last compiler I used was Dev C++ (not sure which version/release but likely an old one). I want to start programming in C++ again but I'm an unaware of which free compiler would be the best to …

Member Avatar for stevanity
0
111
Member Avatar for mg4

Using just height: 80% will fix it at that permanently, stretching smaller images. I've just tried using max-height and it doesn't seem to work in either FireFox or IE. The only solution I could find that wouldn't stretch smaller images is wrapping the <img> in a <div> and setting height …

Member Avatar for Borzoi
0
80
Member Avatar for lsmith93

What you could do is have multiple header files to include with the different meta tags you require and include the necessary one depending on the page you're loading. For example: On index.php?id=about you could include the header file headabout.php and on index.php?id=contact you could include the headerfile headcontact.php using …

Member Avatar for Borzoi
0
157
Member Avatar for essence388
Member Avatar for rolandsmokit
0
121
Member Avatar for TheSecOrg

One thing you could do instead of using cookies is set it so the page you go to has the variable in the URL. Example (not a valid link, in case anyone tries): [url]http://daniweb.com/PHP2.php?age=9&someotherthing=1[/url] So the code in PHP1.php would look something like this: [code=php] <?php $age = 9; $someotherthing= …

Member Avatar for TheSecOrg
0
755
Member Avatar for Alexkid

Could it be that all your never-before-used memory blocks have the same value? It's default "empty" value so to speak. Try it with different type of variables like a char and see if all the chars also have the same value.

Member Avatar for Alexkid
0
2K
Member Avatar for Ankur_tces

Do you mean the mouse cursor or the text input cursor? As far as I know, it's impossible to move the mouse cursor but you can get the text input cursor to move to a new input box.

Member Avatar for Ankur_tces
0
91
Member Avatar for dotnextnewb
Member Avatar for miss_indie

You put the wrong type of single quotes on the line: [code=php] $sql="UPDATE `Sample` SET `Fname`='$a',`Lname`='$b'"; [/code] Here's the correction: [code=php] $sql="UPDATE 'Sample' SET 'Fname'='$a','Lname'='$b'"; [/code] You shouldn't need the quotes though so this should work: [code=php] $sql="UPDATE Sample SET Fname='$a',Lname='$b'"; [/code] You cannot update the database if there is …

Member Avatar for hielo
0
154
Member Avatar for ayesha789

If the page is only ever going to be accessed with localhost, you could just have the page open constantly and code it to refresh itself every 10 seconds.

Member Avatar for digital-ether
0
1K
Member Avatar for facarroll

When you click "view source" on the outputted page, what does [icode]<img src="images/<?php echo $thumbnail ?>" />[/icode] display? If $thumbnail doesn't have a file extension then it's going to be just linking to a folder as the image source.

Member Avatar for facarroll
0
1K
Member Avatar for Borzoi

I am planning to start up a new business soon and part of it is selling online. I was planning on using PayPal in the early days to handle the payments until we can afford good enough security so that we can hold data such as credit card information ourselves. …

Member Avatar for Borzoi
0
216
Member Avatar for andy106

I'm not sure if you can use breadcrumbs with the way that you've got your site set up as the only way I've worked with them is that each crumb is a folder (i.e.: crumb1 >> crumb2 >> crumb3 >> CurrentPage). I could be wrong though. I'm assuming the menu …

Member Avatar for andy106
0
317
Member Avatar for LloydFarrell

[QUOTE=bertin88;1356198]I came across a siuation tat i need to store multiline inputs with paragraps. and i need to insert ( ' ) symbol in sql db thro php. I'm a newbie canany one help?? I used multiline textbox for input. It successfull get inserted to db but when i qurey …

Member Avatar for Borzoi
0
161
Member Avatar for wacmo

You will likely find that most people now have a minimum resolution of 1024x768 but I would suggest making the site work on 800x600.

Member Avatar for 1seo
0
68
Member Avatar for g4george

Compare the source code on your localhost server and when accessing the page online to see if it's rendering it differently for some reason. You can narrow down where the error is then. Is your localhost server a different machine than the one hosting your online site? If so, it's …

Member Avatar for g4george
0
100
Member Avatar for muneer_alam

By "role based access control" do you mean different user levels? For example on a forum you could have administrator, moderator, standard user etc.

Member Avatar for jogesh_p
0
81
Member Avatar for pbcomput

%22 is speech marks (") so it's possible that your WYSIWYG is adding them at the end of the filepath. Check the source code in the WYSIWYG to see if it is there, if not, try adding a backslash (\) at the end of the filepath which should escape anything …

Member Avatar for Borzoi
0
151
Member Avatar for unnamed17

You've given us a localhost URL which would mean the page would need to be on our own computers for us to view it. You will need to give us the public URL for us to view your site.

Member Avatar for Borzoi
0
49
Member Avatar for sameeya007

What is the code supposed to be doing? If $admission_no[$y] is only supposed to output the value of $y then you can replace "$admission_no[$y]" with just "$y". Without more of the code and not knowing what it's supposed to do, we can't help much. Could you please provide more of …

Member Avatar for paulrajj
0
104
Member Avatar for csanchez62

I've come across this problem before and the problem was that someone had plugged in a network cable for a completely different network into the switchbox so every computer was trying to grab information from 2 different networks and it was confusing itself. I see though that you've tried it …

Member Avatar for csanchez62
0
201
Member Avatar for Borzoi

The joke: An SQL query walks into a bar and sees two table, walks up to them and says "Can I join you?" The riddle: Halloween == Christmas - Why?

Member Avatar for Borzoi
0
73
Member Avatar for andydeans

I would recommend that you have it so the entered e-mail address is the "reply-to" address in the e-mail like richieking suggests so that when you click reply, it'll automatically have that e-mail in the "To" box. This way the e-mail sent using the form is still sent using your …

Member Avatar for richieking
0
155
Member Avatar for Borzoi

Is there any way of making an e-mail form using ASP/ASPX? I am limited in what I can do since I'm not a root administrator on the website this is for. The site uses Contensis as it's content management system so if there is some way of doing it via …

Member Avatar for Michel88
0
200
Member Avatar for Krstevski

It shouldn't be a problem not having the "www" at the beginning. From the sounds of it, the DNS redirects [url]http://www.example.com[/url] to [url]http://example.com[/url] which is good practice. Take any website that has their DNS configured correctly, for example daniweb, and you will often find that if you go to [url]http://daniweb.com[/url] …

Member Avatar for Borzoi
0
127
Member Avatar for pallen

I believe this should work: [CODE=php]$query = "SELECT * FROM classics WHERE author LIKE '% $author %' OR title LIKE '% $title %' OR year LIKE '% $year %' OR isbn LIKE '% $isbn %'";[/CODE] The percent symbols are wildcards so if "$author" was set to "Mark" then it should …

Member Avatar for richieking
0
262
Member Avatar for dev.vini

Use the unlink() function. Syntax is [icode]unlink('filename.ext');[/icode] Example: [code] <?php unlink('file.txt'); //Delete "file.txt" from the current folder. unlink('../file.txt'); //Delete "file.txt" from the parent folder. unlink('texts/file.txt'); //Delete "file.txt" from the "texts" folder. unlink('../texts/file.txt'); //Delete "file.txt" from the "texts" folder within the parent folder. $filepath = '../texts/file.txt'; unlink($filepath); //Deletes the specified file …

Member Avatar for richieking
0
88
Member Avatar for Manny7

I'm assuming the strings are variables. Here's a couple ways you could do it: [code=php] <?php $string1 = 'hello'; $string2 = 'goodbye'; echo $string1; //displays "hello" echo $string2; //displays "goodbye" echo $string1[3]; //displays "l" echo $string2[3]; //displays "d" /*The first character in a string is always 0 followed by 1, …

Member Avatar for mschroeder
0
115
Member Avatar for JayGeePee

[QUOTE=rajarajan07;1349869]You cannot add any own tags within html. you can add own tags only in XML.[/QUOTE] That isn't what the topic creator was asking. To change a button into an image: [code=html] <input type="image" src="image.jpg" alt="Submit button"> [/code] I am unsure if this will work for a browse button though. …

Member Avatar for rajarajan2017
0
418
Member Avatar for Staggasaurarts

I think I see what is meant by the page jumps to the top. If you resize your browser so that you can scroll down on the link and scroll down slightly so that you're not at the top but still have the tab buttons in view, the page will …

Member Avatar for Airshow
0
132
Member Avatar for Mike_H

Instead of having all the PHP in the head, you could add the if statement inline: [code=php] <?php session_start(); if(isset($_SESSION['validUser'])) { if ($_SESSION['validUser']!= "True") die("You are not allowed here!!"); } else die("You are not allowed here!"); if (isset($_POST['update'])) { // Save the changes $currentrow = $_SESSION['currentrow']; // (more php code …

Member Avatar for Mike_H
0
34K

The End.