Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

701.

Solve : Final Year Project?

Answer»

Hey guys. I'm about to do my FINAL year project this coming TRIMESTER. I was wondering if any of you guys could suggest what type of project I should do consisting Web Developement using HTML5? I'm kinda new to this, So I need to acquire something which is - What's the latest development in this field (HTML5 & Web Developement) out there that I could carry on and APPLY it on with my project? Any suggestions would be much appreciated. Thanks  Taking a retro game and EMULATING it in HTML5 is always a good one.  Or how about creating a frontend for something like VNC that can store and categorise connections and then run the entire VNC session in the browser?web application that deals with video play list and drag and drop functionality would be a good project I suggest.

702.

Solve : chnaging tags colours with specific search criteria?

Answer» HI i am making a chrome extension and im done up to the most important part, that is to change the background and text colour of specific TAGS that have a certain phrase within them

at the moment the tags are made like this (unchangeable):




"name here"
[/url]



"phrase is here"
[/url]



"other stuff"
[/url]




what i need the script to do (javascript) is to search the WHOLE document for specific phrases / guild tags and if it finds one within the phrase area it changes its text and background colour swell as the other two table cells in that row, i have attempted this several times and have ultimately failed, i can change one item on the table and that is about it so far. any help on how i could do this would be great

(there will be a couple of ARRAYS for the phrases one for allies, enemy's and do not hit.)ok i have made this:

Code: [Select]var num=document.getElementsByTagName("a")
var amo=num.length;

for (i=0; i<amo; i++)
  {
if (num[i].parentNode.parentNode.parentNode.parentNode.className=="layout listing btnlisting sorttable") {
if (num[i].innerHTML.search('[Ebil]')>0) {
alert(num[i].innerHTML);
num[i].parentNode.style.background="#660000";
}
}
  }
the only problem is that it does not always work and it highlights some cells without '[Ebil]' being within the HTML of the a tag
703.

Solve : increasing efficiency of for loops?

Answer»

Code: [Select] for (i=0; i<amo; i++){
//------Fleets on a location------//
if (num[i].parentNode.parentNode.parentNode.parentNode.className=="layout listing btnlisting sorttable") {
if (num[i].parentNode==num[i].parentNode.parentNode.childNodes[1]) {
split1=num[i].INNERHTML.split(" ",1)
for (j=0; j<ftags.length; j++) {
if (split1==ftags[j]) {
colorname(fcolor, '3', num[i].parentNode.parentNode);
var fnum=+num[i].parentNode.parentNode.childNodes[3].childNodes[0].innerHTML.replace(/\D/g,'')
if (num[i].parentNode.parentNode.childNodes[2].innerHTML=='') {ffleet=ffleet+fnum}
else {iffleet=iffleet+fnum}
}
}
for (j=0; j<etags.length; j++) {
if (split1==etags[j]) {colorname(ecolor, '3', num[i].parentNode.parentNode);
var fnum=+num[i].parentNode.parentNode.childNodes[3].childNodes[0].innerHTML.replace(/\D/g,'')
if (num[i].parentNode.parentNode.childNodes[2].innerHTML=='') {efleet=efleet+fnum}
else {iefleet=iefleet+fnum}
}
}
}
}
}

is there anyway of increasing the efficiency of this script?

at the moment it checks to see if a players guild tag is in one of two arrays. but i know the WAY that it is doing it is very inefficient because its  for loop within a for loop. if there is a match it goes to another function to change specific DIV tags colour depending on which guild the player is in.

so can anyone help with making it more efficient


the first for loop can go THREW about 1000 entry's (table ROWS)
for each entry it checks to see if the guild tag (split1) is within one of the two arrays, if its in the first it does one thing and if the tag is in the other array it does another thing

704.

Solve : Web desing?

Answer»

Do you know where i can find a "READY" SITE code like this


============TITLE==============
HOME===PROGRAMS===TUTORIALS====CONTACT(this is the menu to change PAGES)

+++++++++++++++++
=
=MAIN PAGE
=
=
=

Tutorials page has only videos
contact one photo and an email senter
programs button with link to download software


ANY IDEA??? ANY VIDEO HOW TO MAKE IT IN DREAMWEVERS?

Thanks ToUtSi



A program to make the menu is at
 http://atjsmenu.sourceforge.net/http://tv.adobe.com/watch/classroom-basic-site-layout-and-navigation-in-dreamweaver-cs5/part-01-introduction/
HERE IS THE SOLUTION GUYS THANK TO ADOBETV FOR TUTORIALSI need a web designer for my website and also he will change my website logo. so if anyone WANT to work my website PLEASE contact me.

705.

Solve : Contact Form(PHP)?

Answer»

I need help on "CONTACT Form", when I CLICK SUBMIT, I am prompted to download the form, INSTEAD of sending it, what could be causing this error?
The Html code is:

                    Contact Form
                   
                         
                         
                     
                     
                                       
                     * Name
                     
                  
                     
   

                     * Email
                     
                     
                     

                     
   

                     Subject
                     

                     

                     
                     

                     * Your message
                     
                     
      
                     

* Are you human?


                           
                        3 + 1 =
                     

                  
                     
                     
                     
                  
                     
                   
            


The PHP code is:

if(!$_POST) exit;

// Email address verification, do not edit.
function isEmail($email) {
   return(preg_match("/^[-_.[:alnum:]][email protected]((([[:alnum:]]|[[:alnum:]][[:alnum:]-]*[[:alnum:]])\.)
+(ad|ae|aero|af|ag|ai|al|am|an|ao|aq|ar|arpa|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|biz|bj|bm|bn|bo
|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|com|coop|cr|cs|cu|cv|cx|cy|cz|de|dj|dk|dm
|do|dz|ec|edu|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs
|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|in|info|int|io|iq|ir|is|it|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|
kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|mg|mh|mil|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu
|museum|mv|mw|mx|my|mz|na|name|nc|ne|net|nf|ng|ni|nl|no|np|nr|nt|nu|nz|om|org|pa|pe|pf|pg|ph|pk
|pl|pm|pn|pr|pro|ps|pt|pw|py|qa|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su
|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi
|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)$|(([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5])\.){3}
([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5]))$/i",$email));      
}

if (!defined("PHP_EOL")) define("PHP_EOL", "\r\n");

$name     = $_POST['name'];
$email    = $_POST['email'];

$subject  = $_POST['subject'];
$comments = $_POST['comments'];
$verify   = $_POST['verify'];

if(trim($name) == '') {
   echo ' Please enter your name.';
   exit();
} else if(trim($email) == '') {
   echo ' Please enter a valid email address.';
   exit();
}  else if(!isEmail($email)) {
   echo ' You have enter an INVALID e-mail address, please try again.';
   exit();
}

 if(trim($comments) == '') {
   echo ' Please enter your message.';
   exit();
} else if(!isset($verify) || trim($verify) == '') {
   echo ' Please enter the verification number.';
   exit();
} else if(trim($verify) != '4') {
   echo ' The verification number you entered is incorrect. Please enter it again';
   exit(); 
}

if(get_magic_quotes_gpc()) {
   $comments = stripslashes($comments);
}



$address = "[email protected]";




$e_subject = 'You\'ve been contacted by ' . $name . '.';



      
$e_body = "You have been contacted by $name with regards to $subject, their additional message is as follows." . PHP_EOL . PHP_EOL;
$e_content = "\"$comments\"" . PHP_EOL . PHP_EOL;
$e_reply = "You can contact $name via email, or $email";
      
$msg = wordwrap( $e_body . $e_content . $e_reply, 70 );

$headers = "From: $email" . PHP_EOL;
$headers .= "Reply-To: $email" . PHP_EOL;
$headers .= "MIME-Version: 1.0" . PHP_EOL;
$headers .= "Content-type: text/plain; charset=utf-8" . PHP_EOL;
$headers .= "Content-Transfer-Encoding: quoted-printable" . PHP_EOL;

if(mail($address, $e_subject, $msg, $headers)) {

   // Email has sent successfully, echo a success page.
   
   echo " ";         
   echo " ";
   echo " Email Sent Successfully.";
   echo "

Thank you $name, your message has been submitted to us.

";
   echo "";
   echo "";
   echo "";
      
} else {

   echo 'ERROR!';

}
706.

Solve : Help With Undefined Variable?

Answer»

Having trouble finding the right solution for errors in PHP. The error reads.....


Notice: Undefined variable: SELECTED in C:\wamp\www\tcpro_34000\register.php on line 264

Call Stack

#   Time    Memory   Function   Location
1   0.0124   200688   {main}( )   ..\register.php:0

Line 264 then reads...

echo "".$row['groupname']."\n\r";
$selected="";

Any idea why this is happening? Any help would be nice thanks.I'm guessing you haven't defined what the variable "selected" is before that line. Can you post the BLOCK of CODE (not the whole file)?

707.

Solve : Contact Form Php?

Answer»

I need help on "contact FORM", when I click submit, I am prompted to download the form, INSTEAD of sending it, what could be causing this error?
The Html code is:

                    Contact Form
                   
                         
                         
                     
                     
                                       
                     * Name
                     
                 
                     
   

                     * Email
                     
                     
                     

                     
   

                     Subject
                     

                     

                     
                     

                     * Your message
                     
                     
     
                     

* Are you human?


                           
                        3 + 1 =
                     

                 
                     
                     
                     
                 
                     
                   
           


The PHP code is:

if(!$_POST) exit;

// Email address VERIFICATION, do not edit.
function isEmail($email) {
   return(preg_match("/^[-_.[:alnum:]][email protected]((([[:alnum:]]|[[:alnum:]][[:alnum:]-]*[[:alnum:]])\.)
+(ad|ae|aero|af|ag|ai|al|am|an|ao|aq|ar|arpa|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|biz|bj|bm|bn|bo
|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|com|coop|cr|cs|cu|cv|cx|cy|cz|de|dj|dk|dm
|do|dz|ec|edu|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs
|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|in|info|int|io|iq|ir|is|it|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|
kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|mg|mh|mil|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu
|museum|mv|mw|mx|my|mz|na|name|nc|ne|net|nf|ng|ni|nl|no|np|nr|nt|nu|nz|om|org|pa|pe|pf|pg|ph|pk
|pl|pm|pn|pr|pro|ps|pt|pw|py|qa|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su
|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi
|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)$|(([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5])\.){3}
([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5]))$/i",$email));     
}

if (!defined("PHP_EOL")) define("PHP_EOL", "\r\n");

$name     = $_POST['name'];
$email    = $_POST['email'];

$subject  = $_POST['subject'];
$comments = $_POST['comments'];
$verify   = $_POST['verify'];

if(trim($name) == '') {
   echo ' Please enter your name.';
   exit();
} else if(trim($email) == '') {
   echo ' Please enter a valid email address.';
   exit();
}  else if(!isEmail($email)) {
   echo ' You have enter an invalid e-mail address, please try again.';
   exit();
}

 if(trim($comments) == '') {
   echo ' Please enter your message.';
   exit();
} else if(!isset($verify) || trim($verify) == '') {
   echo ' Please enter the verification number.';
   exit();
} else if(trim($verify) != '4') {
   echo ' The verification number you entered is incorrect. Please enter it again';
   exit(); 
}

if(get_magic_quotes_gpc()) {
   $comments = stripslashes($comments);
}



$address = "[email protected]";




$e_subject = 'You\'ve been contacted by ' . $name . '.';



     
$e_body = "You have been contacted by $name with regards to $subject, their additional message is as follows." . PHP_EOL . PHP_EOL;
$e_content = "\"$comments\"" . PHP_EOL . PHP_EOL;
$e_reply = "You can contact $name via email, or $email";
     
$msg = wordwrap( $e_body . $e_content . $e_reply, 70 );

$headers = "From: $email" . PHP_EOL;
$headers .= "Reply-To: $email" . PHP_EOL;
$headers .= "MIME-Version: 1.0" . PHP_EOL;
$headers .= "Content-type: text/plain; charset=utf-8" . PHP_EOL;
$headers .= "Content-Transfer-Encoding: quoted-printable" . PHP_EOL;

if(mail($address, $e_subject, $msg, $headers)) {

   // Email has sent successfully, echo a success page.
   
   echo " ";         
   echo " ";
   echo " Email Sent Successfully.";
   echo "

Thank you $name, your message has been submitted to us.

";
   echo "";
   echo "";
   echo "";
       
} else {

   echo 'ERROR!';

}
Reply
Quote
NotiI have a few questions.
What version of html and php are you using?
Is the php code some thing you copyed and pasted from an example?
What browser/ web development program are you using?
Is there a difference between this topic and the one you posted  DAYS prior to this one?
708.

Solve : Need a hand embeding video files into my website?

Answer»

I am having quite a difficult time with this.  All of the videos work correctly when I view my website in firefox but in CHROME nothing appears and in Internet EXPLORER only the play button appears with no video above it.

Is there any kind of universal video EMBED code that will work in all 3 of those browsers?

Here is what I have currently as my code.

http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
standby="Loading Microsoft Windows® Media Player components..." type="application/x-oleobject" width="280" height="256">






http://www.microsoft.com/Windows/MediaPlayer/" SRC="videos/M-14.avi" name="MediaPlayer1" width=350 height=350 autostart=0 showcontrols=1 volume=-450>   if it works in firefox and not chrome, something is probably wrong with the embed code, but it looks okay to me. may be a plugin compatibility issue as well (?)

in IE, it looks like the param where you set the video name is incorrect. I think you MEAN for that first tag.Thank you Techno all seems to be working now )

709.

Solve : website programming and website designing.?

Answer»

I don't know am i post in right PLACE? If i commit any mistake,then i APOLOGIZE you. i want to know one thing that what is the difference between website programming and website designing?
You can design a website on paper before any 'programming' is done using wireframes and colour DESIGNS etc

To expound upon reddevilggg's explanation:
A website designer decides how the website is laid out, what fonts and colors to use, and what types of content appear on what parts of the page.
A website programmer writes the actual code to display the website in the browser and CODES the links between pages and to other files.Good morning TechnoGeek

Very nice, CLEAR & easy explanation for the OP. Mike

710.

Solve : Need A Hand on phpbb forum?

Answer»

Hello Everyone,

I just posted a phpbb forum and I for the life of me cannot find a certain setting that needs to be changed.  My forum by default REQUEST I the admin approve all topics posted. I do not want this to be a requirement.  I WOULD like to allow the members to post whatever they want without me having to read over it before its put up.  Does ANYONE have an idea on where this setting might reside?I found this: https://www.phpbb.com/support/documentation/3.0/moderatorguide/moderator_queue.php
I couldn't find the exact permission mentioned ("Moderator QUEUE") in the documentation quickly, so I just posted this link here. It looks like some of their documentation is incomplete on permissions.

In particular,
Quote

If a forum or user’s permissions are set to moderator queue via the Administration Control Panel, all posts made in that forum or by this user will need to be approved by an ADMINISTRATOR or moderator before they are displayed to other users.
711.

Solve : circular status bar?

Answer» HELLO i dont know if this is possible or not but i know it can be easily done using a linear bar display to show a percentage.

is it possible to do it over a circular bar without having multiple images?

this is what it looks like so i would like the two orange bars to represent a percentage by actively moving around the dial (preferably JAVASCRIPT if possible as it is going onto a desktop GADGET):

similar to how this works:

http://blakek.us/labs/jquery/css3-pie-graph-timer/

but i am unsure how this is done if anyone can tell me how to do this then that would probably solve my problemInteresting...Are you two related? I logged on and found this as soon as I got a password reset request.oh wow, IVE been using this logon for years XD

i thought i previously had and account on here and forgot my password, hence the password reset.

well this is fun ^.^anyway how would i do this You're looking at Flash or HTML5 really for this.  Javascript/CSS2 on their own don't give you a good drawing canvas.  HTML5 does though.
712.

Solve : float?

Answer»

i'm using float POSITION on a block in it's style.. but it's positioned upon the block above it.. although I used margining LEFT and right in both blocks..

I don't get what's happening here.. can some one EXPLAIN with a solution?!..

Also, another problem I'm FACING in creating my first web page.. When I resize(to smaller) the explorer i notice that the contents of blocks collapse over each other instead of having same position and giving me the ability to scroll left and right..

How do I solve that?!!

daytripper1989
thanks in advanceLink to web page?

Copy CSS CODE?

713.

Solve : Script won't load in Firefox?

Answer»

The JS code for blinking text on my site won't load for me in Firefox.

-Offline, it works fine in all browsers
-Online, it works fine in Chromium and Epiphany
-Online, the JS will not load. All other content (HTML/CSS) loads, but it continues to be 'loading' indefinitely, and will never load the JS (meaning the text will not blink).
-Someone else with a faster connection claimed the text blinks in Firefox

How can I fix this? The URL is http://site-x.zxq.net/. Yes, it's a Rickroll site, but I am not trying to troll anyone here, my question/problem is real.

I've tried it multiple times, and it never works in Firefox. Always in Chromium.

Lastly, I am semi-decent with HTML/CSS but I hardly know anything about JS. I modified code from a w3schools.com sample to make the text blink. So please keep the advice as noob-friendly as possible.

Ubuntu 10.04 LTS if it matters. Slow connection (phone tethered to laptop; high speed isn't available here).

Thanks. QUOTE

Offline, it works fine in all browsers

Offline it works & Online it doesn't to me points to security related to Java Script. FF15 is blocking JS from online sources yet it allows it to execute locally. I'd go into security and make sure JS is enabled for both LOCAL and www.

Internet speed shouldn't MATTER as for once the HTML is loaded with the JavaScript the TEXT should blink, once loaded you could unplug from internet and it will continue to blink. Can you list your JavaScript source here so I can look it over for issues? There's a way to blink text through CSS, which would make JS unnecessary. (btw the JS worked for me in firefox 18.0a1-20120907)
Code: [Select]<span style="text-decoration: blink;">blink text</span>I just opened the site again in Firefox and after waiting a long time (few minutes maybe) the script finally loaded. But I don't get why it TOOK so long. My connection is slow, but not that slow. It only takes a few seconds max for the SWF video on my site to load, and most web pages will fully load in a few seconds.

DaveLembke, in I have Code: [Select] <script type="text/javascript">
function blink()
{
if (!document.getElementById('blink').style.color)
{document.getElementById('blink').style.color="white";}
if (document.getElementById('blink').style.color=="white")
{document.getElementById('blink').style.color="#CC00FF";}
else
{document.getElementById('blink').style.color="white";}
timer=setTimeout("blink()",333);
}
function stop()
{clearTimeout(timer);}
</script>
In body I use and text.


TechnoGeek, that's the same as the tag, correct? I used before, and it worked in Firefox but not in Chromium, which is why I switched to JS. It was also due in part to the tag not even being listed on w3schools.com making me think it is obsolete or something. I tried your version and again, it works in Firefox, but not Chromium (even offline it does not work in Chromium). I've never had issues with Chromium not loading scripts in the past, so I don't think it's an issue with my settings. Quote from: ShadowVegan on September 08, 2012, 07:35:47 PM
TechnoGeek, that's the same as the <blink> tag, correct?

No. It's a CSS text decoration. It's part of the HTML DTD.Regardless, they both had the same effect: Work in Firefox, not Chromium. Using HTML5 doctype if it matters.Found this:
http://stackoverflow.com/questions/4894488/blinking-text-cross-browserI'll take a look, thanks.
714.

Solve : WordPress Site does not load, PHP Error.?

Answer»

Okay guys, I have a WordPress website which was working perfectly fine last night. But when I checked it today I am receiving this error:

Code: [Select]WARNING: Unknown: failed to open stream: Permission denied in Unknown on line 0

Fatal error: Unknown: Failed opening required '/home/xxxxx/public_html/wp/index.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in Unknown on line 0

I tried changing the permissions on index.php from 644 to 755 to no avail. I have back up for my WordPress site but, I have done some work to some pages which have not been backed up.

Any help would be greatly appreciated.My site is working now. It's an ISSUE with the chroot environment and my hosting SERVICE RAN script is to fix it. They didn't update the service status notifications, so I thought it was an issue on my END.

715.

Solve : Drop down menu options using HTML??

Answer»
Option1
Option2
Option3


using the code above, a simple drop down menu is created... but what I want is that when an option is chosen, eg Option 2, an image and table appear below the drop down menu. I am trying to create a comparison website that would have two menus side by side.

http://i.imgur.com/btiAY.png

Something that looks similar to that but with the image + table mentioned above.

Any help?  I would get DREAM weaver to do this alot easier.  Since you seem new to HTML codeing it in notepad is a huge pain.  The easist thing I learned to do is look at the code of some PAGES an REMOVE what you dont want.  I understand what your wanting however, you linked an image.  Some times there are also, templates you can follow an change to make it how you want it Quote from: jordaiin on September 20, 2012, 05:52:55 AM
&LT;select name="List" size="1">
<option value="Option1">Option1</option>
<option value="Option2">Option2</option>
<option value="Option3">Option3</option>
</select>

using the code above, a simple drop down menu is created... but what I want is that when an option is chosen, eg Option 2, an image and table appear below the drop down menu. I am trying to create a comparison website that would have two menus side by side.

http://i.imgur.com/btiAY.png

Something that looks similar to that but with the image + table mentioned above.

Any help? 

Please ignore the enthusiastic, but misguided input from Ryuk.  What you are talking about would require the use of javascript.  My preference would be to use something like jQuery (a javascript framework) but if you're just starting out with HTML, that might be too much, too soon.
716.

Solve : Website displays differently in Chrome Than IE.?

Answer»

Can one of you please check the source code for this site and let me know what changes need to be made to make it display properly in internet explore, currently the headerbox is about an inch to low when VIEWED from IE 8?

Thanks,
RYAN

[year+ OLD attachment DELETED by admin]How are we going to check the source code?

717.

Solve : How to make over & down-state navigation buttons??

Answer»

I want to make navigation buttons that change when you mouse over them and change when you click on them. I used to USE Dreamweaver CS3 from the complete CS3 package that had a tool that did this for me, but now I'm stuck with the complete CS6 package and for some reason that I cannot fathom, they took that tool out. So how do I make buttons that change states according to how they are INTERACTED with?Looks LIKE it's still there.  Read this article (SEARCH for the word "rollover"): http://www.pcworld.com/article/256490/adobe_dreamweaver_cs6_review_mobile_app_development_the_html_5_way.html

718.

Solve : "go back" placemark?

Answer»

How do I set up a page to; Hitting the "BACK" BUTTON returns me to the place I LEFT on the previous page.It should do that ANYWAY...can you explain a bit more?

719.

Solve : Footer Menus?

Answer»

Hello.

On my website, i have a homepage that is really just a portal to other webpages ((I know, horrible for SEO)) Either way, i am in need of creating a footer menu on that site.

The current code is at http://jaredkat.net.

My goal is already on one of the sub-websites that i have, http://hosting.jaredkat.net . HOWEVER, i want the footer to be at the bottom. A 100 px high footer may be what i am looking for.

My main problem with just copying code from a template or anything of the like, is that it does not work on that page for whatever reason. The css wont force a footer to the bottom. And a few other glitches take place.

If someone could look at the code and just tell me how to make the CSS ELEMENT at the bottom of the page, that would be incredible.

I want to add a background to the footer (maybe a red background that fades to transparency as it goes upwards on the css element) that would blend into the main background, so having a seamless design would be nice, and if anything, i want to avoid scroll bars on RESOLUTIONS above 1024 x 768.

If anyone has ideas on what else i could do with this portal page to make VISITORS be more willing to explore, then i would appreciate it. Thanks.

720.

Solve : SMF BB some things I would like to learn?

Answer»

[url]I am not sure how others in this fourm and others are going about doing somethings and I would like to KNOW how they do it.

Could someone expalin me how this was done using the exaple from ONE of dave's posts. Along with you put it the fourm itself? Any BBcode I should know?

I am running windows 7-32 bit pro laptop if that matters for any of the programs that you advise I try out.

Thanks

[year+ old attachment deleted by admin]http://docs.simplemachines.org/index.php?board=22.0

This is the best reference I know of which SHOW examples. I played with this a while back but am no master of it.I just took a look at that link, they have moved to online documents. I would be more then fine with that idea, but I have LOOKED that thing inside out and still can't SEEM to find it or I missed it.

I do thank you for your feedback and will go back to making sure I google more. I just thought someone here would have a source that I would understand. Still looking and thanks for your input and help.Is this what you mean?
http://wiki.simplemachines.org/smf/Bulletin_board_codethank you kpac for your help, I guess I just overlooked the link.

721.

Solve : Puzzled as to where this prints??

Answer» This SIMPLE page is used for a LARGE, numeral countdown so as to be visible some distance from the monitor. This prints the numeral 1.

My problem is that the numeral prints at the bottom of the screen and I can't figure out why? If I use a font pt larger then 500 then the numeral starts slipping off at the bottom, so in order to have the whole thing I'm restricted to 500 pt. In other words, I have this big blank space at the top.  (28in monitor set at native pixal size of 1920 wide).

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Final//EN">
<HTML>
<HEADING>
<TITLE>1 HTML</TITLE>

<STYLE>
H2{font-size : 500pt}
</STYLE>
</HEADING>

<BODY>
<script>
/*Random background color- by javascriptkit.com
Visit JavaScript Kit (http://javascriptkit.com) for script
Credit must stay intact for use*/
//Enter LIST of bgcolors:
VAR bgcolorlist=new ARRAY("#DFDFFF", "#FFFFBF", "#80FF80", "#EAEAFF", "#C9FFA8", "#F7F7F7", "#FFFFFF",

"#DDDD00", "#A1543F", "#708A92", "#49CE2A", "#3B50BF", "#A50562", "#E049F4", "#9E55D3", "#EB1440", "#4BC054",

"#3A6A94", "#D3DEE3", "#48435B", "#39BE6A", "#5D0630", "#40F6B2", "#765BAB", "#F1A343")
document.bgColor=bgcolorlist[Math.floor(Math.random()*bgcolorlist.length)]
</script>
<H2>01</H2>
<META HTTP-EQUIV="Refresh" Content="60;url=finished.html">
<BGSOUND SRC="buzzer.wav" LOOP="2">
</BODY>
</HTML>


Thanks in advance for any help.
 
722.

Solve : Problems with spammers on my forum.?

Answer»

Hey guys,

I have a phpbb forum version 3.0.10 I have been having an annoying problem with spam postings appearing on my forum.  I am not sure if it is some type of bot or actual people taking the time to do it.  Most of the time its a link with a little bit of text right before it for "fake gucci purses".  Other times its advertisements for some type of medication. The sign up names on my forum that post all of this crap are usually gibberish nonsense as well.

I immediately ban the i.p. and terminate the account but I was wondering if there was something else I can do to prevent this?

ThanksThere is a way to prevent bots, but to prevent humans is harder. Bots can be stopped by requiring e-mail verification before posting and using the "type the text shown in an image" anti-bot Captcha feature with the letters jumbled etc to block screen SCRAPERS from OCR'ing it to bypass. Stopping a human is harder but most wont spend the time to make 100 different accts to spam with.

http://captcha.goyello.com/enI understand the need for CAPTCHA's, but due to the fact that not everyone in this world can clearly make out the text in an image. I personally would use "logic questions". You do not have to be "blind" to use these. Although they are helpful for us as well, they in my view benefit people that have other eye problems. Some examples would be Stigmatism, Dyslexia, and Diabetic Retinopathy. The numbers for those with eyesight problems is clearly in the rise not just for the blind but the aging population is on the rise as well.
Here is the link: http://textcaptcha.com/

Dyslexia is not an eye problem but it sure affects your text reading. In addition, in case you are wondering those sounds Meant for making the web accessible by hearing it does not work very well. As a few friends of mine have pointed out, I have been blind for 30 years and am still unable to get the whole audio. Pros and cons to each, but I am sure you know where I stand on this.   
A person came up with the project of webvisum  an add on to Firefox that tries to fix this problem, but there are some images it is unable to ocr. http://www.webvisum.com/ Also, due to the fact that this is helpful for us, but could be a bad thing if someone LIKE a spammer gets an account here.  This is a great project, but can be bad if someone gives the link to someone and they just do that for getting past things. My point is there are pro’s and con’s to both options, but it is up to the WEBMASTER. One more thing, for those who are deaf the second option is a bit better if you are also blind and deaf like a few people I know and the big problem they don’t render on a braille display. Heck half the time sighted people can’t see them, but they are also needed until another improved option comes along.   


Hi there.
I have the same problem with the names making no sense on my forum and I having almost an unlimited amount of posts regarding MEDICAL stuff and a whole lot of russian posts as well.
I am running with phpBB 3.0.11

I have captcha on and have e-mail confirmation on as well. I am uncertain if it is people or bots who is spamming, but as I have captcha on, my logic says that it's actually people who has way too much time on their hands.

Do you have any idea to how this can be reduced and possibly how I can hit the target group (people playing or want to play poker)?

Best regards,
Niantic

723.

Solve : How to save data from a PHP form?

Answer»

Hi 
     Everybody,

                          I want to use a php form to save the data inputted to it ,within the hosting server as simple text file. As most of the hosting services don't provide mailing PHP and even if so then the mail address must of the of the same domain for which the hosting server is being used. So i wondering is there any way to save the information  instead of sending via email. Kindly Please help me.                    

                                                    The Form Code  
      "http://www.w3.org/TR/html4/strict.dtd">


Your Informations




Your Name:

Your Email:

Your Message:
 







                                                          The PHP code for the form
$to = "[email protected]";
$subject = "Results from your Request Info form";
$headers = "From: Form Mailer";
$forward = 1;
$location = "http://XXXXXXXX.com";

$date = date ("l, F jS, Y");
$time = date ("h:i A");



$msg = "Below is the result of your feedback form. It was submitted on $date at $time.\n\n";

if ($_SERVER['REQUEST_METHOD'] == "POST") {
   foreach ($_POST as $key => $value) {
      $msg .= ucfirst ($key) ." : ". $value . "\n";
   }
}
else {
   foreach ($_GET as $key => $value) {
      $msg .= ucfirst ($key) ." : ". $value . "\n";
   }
}

mail($to, $subject, $msg, $headers);
if ($forward == 1) {
    header ("Location:$location");
}
else {
    echo "Thank you for submitting our form. We will get back to you as SOON as POSSIBLE.";
}

?>



    Above form and PHP script work fine for servers providing an email PHP script. But most of the free hosting services are not providing it anymore. So it will also work for me if i COULD make an arrangement to save the inputs of the form..

                    What Minimal Modification in the script can serve the PURPOSE                                                   

             
Thanks.....

                                       Try something like this...

HTML Form Code:

Code: [Select]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Your Informations</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form action="mailer.php?savedata=1" method="post">
Your Name: <input type="text" name="name"><br>
Your Email: <input type="text" name="email"><br>
Your Message:<br> <textarea name="message" rows="5" cols="30"></textarea><br>
<input type="submit" name="submit" value="Submit">
</form>
</body>
</html>

PHP Code:
Code: [Select]<?php
$savedata = $_REQUEST['savedata'];
if ($savedata == 1){ 
$data = $_POST['name'];
$data = $_POST['email'];
$data = $_POST['message'];
$file = "YOURDATAFILE.txt"; 

$fp = fopen($file, "a") or die("Couldn't open $file for writing!");
fwrite($fp, $data) or die("Couldn't write values to file!"); 

fclose($fp); 
echo "Your Form has been Submitted!";

}
?>
Quote from: fffreak on December 29, 2008, 03:19:08 PM

PHP Code:
Code: [Select]<?php
$savedata = $_REQUEST['savedata'];
if ($savedata == 1){ 
$data = $_POST['name'];
$data .= $_POST['email'];
$data .= $_POST['message'];
$file = "YOURDATAFILE.txt"; 

$fp = fopen($file, "a") or die("Couldn't open $file for writing!");
fwrite($fp, $data) or die("Couldn't write values to file!"); 

fclose($fp); 
echo "Your Form has been Submitted!";

}
?>

You forgot one small thing there - a full STOP for the $data variable. If you don't have the full stop you will get a PHP error.Thanks for catching that, I was quite tired when typing that up, plus I was at work . Quote from: fffreak on December 30, 2008, 02:12:58 PM
Thanks for catching that, I was quite tired when typing that up, plus I was at work .

Alright.

We all make small mistakes like that. I know, it's a old thread, but I have a question here. This form glues the result to one string like,

Name1Email1The Message1Name2Email2The Message2Name3Email3The Message3Name4Email4The Message4

I normaly don't use PHP, now I need this code, but without that error. I read some PHP stuff but couldn't find a solution.

Thanks for your help.I got a very fast answer on Stackoverflow.
http://stackoverflow.com/questions/12908334/new-line-in-php-output-in-a-text-file

Quote
$data = $_POST['name'] . PHP_EOL;
$data .= $_POST['email'] . PHP_EOL;
$data .= $_POST['message'] . PHP_EOL;
Quote from: DarthSeverus on October 16, 2012, 08:45:06 PM
I got a very fast answer on Stackoverflow.
http://stackoverflow.com/questions/12908334/new-line-in-php-output-in-a-text-file

Either that or use this:
Code: [Select]$data = $_POST['name'] . "\n";
$data .= $_POST['email'] . "\n";
$data .= $_POST['message'];
...where \n means "new line".
724.

Solve : opening a virtual page?

Answer»

hello is there a way of opening a page virtualy using a php script?

for example php script is on a server and it set to RUN every day at 12:00 ect, when it hits 12:00 it will open a website as if it was a USER and the be able to access the nodes of that page to take infomation off of it? is this EVEN possible?PHP scripts are not like RUNNING programs.  If you need a scheduled task, you'd normally use a cron JOB.

725.

Solve : sendig an array over ajax?

Answer»

hello i have quite a large array of data that i would LIKE to send to my database. i currently use javascript or client SIDE and php for SERVER side. how would i send an array using an ajax request and also how would i make use of that array on php.Use JSON to bundle up your array.

http://webhole.net/2009/11/28/how-to-read-json-with-javascript/
http://uk3.php.net/manual/en/book.json.phpim kinda new to php but unfortunately it does not make much sense to me :/ could you give me a code example? as i learn a BETTER from seeing how existing code is done ^.^


also what is jquery?There are code examples on those pages I linked to!

jQuery is an excellent javascript library that makes working with javascript much much easier.

726.

Solve : Page Title?

Answer»

I'm creating my own website from scratch and use the "unlimited space" on cwahi.

So far I've gotten the initial index.html plus a contact form and thank you page.

The only problem I'm having at the moment is creating some sort of custom page title for the contact form.

That wouldn't be a problem if I had it as an html file.

I've got it as a php.

With html I know that the code would read as <title>Chris's Corner</title>.

But since this is php I've got no idea and not having much luck finding any articles anywhere on how to do this beside using the header (Don't understand how this is suppose to happen.)

If anyone out there can point me in the right direction or give some advice, I really would appreciate it.



TYIAYou can write normal HTML code in a PHP file.  It should display normally.  PHP just brings some extra features.  Anything between the TAGS are PHP code.  If you don't use those tags, it will just act like normal HTML.

That said, if you strip out the PHP, it may be that the contact form will not function correctly any more.  In short, you may need to learn PHP to understand what's going on.Just speaking hypothetically, if i were to include the tag I mentioned above before the initial php code it would display the text that I insert right? Quote from: DallasHack on October 30, 2012, 10:24:27 AM

Just speaking hypothetically, if i were to include the tag I mentioned above before the initial php code it would display the text that I insert right?
The code would be there, yes, but the browser probably wouldn't interpret it properly, or you might have duplicate title tags. The title tag has a specific location (the head section) which may be in another php file somewhere (using the include() or require() directives in php)

What is the output of the contact page when you view it in a browser? It should include a title somewhere. You can search your php files (good text editors or IDEs have a 'find in files' function) for a title tag or the current contact page title and see what you would have to do to CHANGE it. Because every website or CMS is configured a bit differently, you might have an administration tool to make edits in, some other file that holds information about the pages in your site, etc. etc.

If you don't see a title tag in your contact page's file, you need to find where the code actually resides and change it there.This is the code from the contact.php:

Code: [Select]<?php

session_start();
//Email Validation
function checkEmail($email) 
{
   if(eregi("^[a-zA-Z0-9_][email protected][a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$]", $email)) 
   {
          return FALSE;
   }

   list($Username, $Domain) = split("",$email);

   if(getmxrr($Domain, $MXHost)) 
   {
          return TRUE;
   }
   else 
   {
          if(fsockopen($Domain, 25, $ERRNO, $errstr, 30)) 
          {
                 return TRUE; 
          }
          else 
          {
                 return FALSE; 
          }
   }
}


// get posted data into local variables
$EmailTo = "fake [email protected]"; 
$EmailFrom = Trim(stripslashes($_POST['EmailFrom'])); 
$Name = Trim(stripslashes($_POST['Name'])); 
$Subject = Trim(stripslashes($_POST['Subject'])); 
$Message = Trim(stripslashes($_POST['Message'])); 

// validation
$validationOK=true;
if(checkEmail($EmailFrom) == FALSE){
$error_msg[] = "Please enter in a valid email address.";
}
if (Trim($Name)==""){
$error_msg[] = "Please enter in a name.";
}
if (Trim($Subject)=="") {
$error_msg[] = "Please enter in a subject.";
}
if (Trim($Message)==""){
$error_msg[] = "Please enter in a message.";
}
//triggers error message
if ($error_msg) {
$_SESSION['error_msg'] = $error_msg;
header ('Location: index.php');
exit();
}
//sends email
else {
$Body = "You have a new email from $Name.\n\n Reply to $EmailFrom.\n\n $Name says,\n $Message";
$success = mail($EmailTo, $Subject, $Body);
}
//redirect to success page
if ($success){
  print "<meta http-equiv=\"refresh\" content=\"0;URL=ThankYou.html\">";
}
else{
  print "Email could not be sent due to errors. Please email the <a href='mailto:[email protected]>Webmaster</a>.";
}
?>


And as far as the page title for this it shows the url:

Code: [Select]http://b455hunt3r.cwahi.net/index.phpAdd a title tag to your index.php somewhere.

As a side note, none of this code looks valid (contact.php and index.php certainly aren't, anyway) because it LACKS the html, head, and body tags. You may want to look into adding these.I just looked at the stuff and that code is what is suppose to verify and send to my email.


This is the correct code for the form:

Code: [Select]<?php session_start(); ?>
<!--Start error code-->
<?php
if ($_SESSION['error_msg']) {
foreach ($_SESSION['error_msg'] as $val) {
echo "$val<br />";
}
unset($_SESSION['error_msg']);
}
?>
<!--End Error Code-->

<!--Start Form Code-->
                               
<form method="POST" action="contact.php">
                                                               
<p><label for="Name">Name</label><br />
<input id="Name" name="Name" type="text" tabindex="1" size="30" /></p>
                               
<p><label for="EmailFrom">Email</label><br />
<input id="EmailFrom" name="EmailFrom" type="text" tabindex="2" size="30" /></p>
                               
<p><label for="Subject">Subject</label><br />
<input id="Subject" name="Subject" type="text" tabindex="3" size="30" /></p>
                                                       
<p><label for="words">Message</label><br />
<textarea name="Message" tabindex="5" rows="10" cols="24" style="width:300px;"></textarea></p>
                               
<input type="submit" name="post" id="post" value=" Send " />  <input type="reset" value=" Reset " />
</form>
<!--End Form Code-->And not to bump this thread but thanks for taking a moment to reply.I figured out what to do.

All I had to do was take the homepage code and past the contact form code inside the body section and I changed the title in the section where it was located.

Thanks for the help though guys.

727.

Solve : pdf file in html?

Answer»

I gave a link  to a pdf file in my website.....i want that when anyone click on this link from anywhere then this pdf file OPEN with fit to page....not in any other ratio...............PDF files CONTAIN within themselves a suggestion on how to view the PDF when opened.  So before SAVING the PDF, you can choose the "fit to page" viewing option (if you created the PDF yourself).  Then the PDF VIEWER or PDF browser plugin will probably load the file as you desire.

If you don't have control over the setting within the PDF document, you're at the mercy of the the behaviour of the PARTICULAR plugin the user has installed in the browser.  There are a few programmatic ways to work around this.  Further reading:

http://andreasgal.com/2011/06/15/pdf-js/
http://www.planetpdf.com/mainpage.asp?webpageid=1682
http://www.webhostingtalk.com/showthread.php?t=1001514

728.

Solve : Duplicating HTML Code for navigation bar?

Answer»

Hoping to get help from HTML writers:

I don't want to repeat my navigation bar for every page in my site. Can I create it once and then reference it in every other page? Or am I stuck with rewriting the code for every page?You will want to use Frames as referenced here: http://www.velocityreviews.com/forums/t158816-frames-and-a-navigation-bar-and-css.html

Quote

One of the reasons that frames were invented is to enable a navigation bar -
that is - the main page content changes whereas navigation information
remains static and is not duplicated into every html file.
Nooooo....please, do not use frames.

If you don't want to repeat the code on every page, you'll need to use a server-side language like PHP to do it. Quote from: kpac on November 14, 2012, 11:12:51 AM
Nooooo....please, do not use frames.
This made my week
Yeah, frames are not well supported and have been deprecated for many years.

Quote
If you don't want to repeat the code on every page, you'll need to use a server-side language like PHP to do it.
To expand on this:
In PHP, you can use code similar to include($REQUEST['page'] . '.html). If you GO to page.php?page=test, test.html will be displayed.
mod_rewrite can be used to further simplify this to mysite.com/test displaying the test page.
(WARNING: this EXACT code has a lot of problems with it and is not at all secure)
Well we both learned from this then.. LOL ... I learned Programming for the Web back in college in 2000. Interesting to find out that Frames should be avoided now 12 years later with better methods being server side SCRIPTING languages like PHP  Quote from: DaveLembke on November 14, 2012, 08:45:15 PM
Well we both learned from this then.. LOL ... I learned Programming for the Web back in college in 2000. Interesting to find out that Frames should be avoided now 12 years later with better methods being server side scripting languages like PHP 
Oh don't worry, I'm currently doing a web design module in college and they're teaching frames. Luckily I got all my knowledge from 4-5 years experience and self-research.Surprised FRAMES haven't gone the way of GOTO's in programming if they should be avoided in favor of a better method. I guess I have yet to hear the term Spaghetti HTML if using Frames. I started programming on Basic in 1984 and when I learned C++ in college the professor was like "NOOOOOOOOOOOOO .... Ok so you found out that GOTO exists in C++, We dont teach it so NEVER USE IT"...LOL. Someday Frames will go the way of GOTO's and some student will add a frame and the teacher will cry out NOOOOOOOOOO...LOL    Quote from: nanwat on November 13, 2012, 06:55:22 PM
Hoping to get help from HTML writers:

I don't want to repeat my navigation bar for every page in my site. Can I create it once and then reference it in every other page? Or am I stuck with rewriting the code for every page?
I believe you could somewhat streamline the process by creating a template page which contains only your navigation bar.  Then, when you want to add a page, open the template and save it with a different file name and then add the content for that new page. Quote from: DaveLembke on November 17, 2012, 01:31:17 AM
Surprised FRAMES haven't gone the way of GOTO's in programming if they should be avoided in favor of a better method.

Personally, I think that saying "never use X" is premature. Like Goto's, Frames do have their place.

However, that place is nowhere on the modern web. Using Frames will both date your website in addition to simply being rather gross. For example, even when you found frames rather prevalent, you didn't find them on the sites of most tech companies, because even then, they were bad practice. How so? Well, the biggest problem, IMO, with frames, is that they don't work properly with various accessibility tools. Add to this browser dependence (in that different browsers will often interpret the Frameset's differently) pair this with how they go against the fundamental concept of the web as a large collection of individual pages, linked together with hypertext and links and with standalone URLs . The simplicity of the basic concepts are what made the early web both easy to use and incredibly popular. With the more recent focus on web applications (rather than pages) frames take an even further step back, since they are pretty difficult to automate or deal with via client-side script, and considering it's just as easy to use things like CSS floats paired with either a server side include for things like navigation or even an iframe if you really want to keep the content separate, it's no wonder Frames are frowned upon.

Quote
I guess I have yet to hear the term Spaghetti HTML if using Frames.
Because spaghetti HTML would be impossible in concept. HTML is not a programming language, and it does not "execute", and since spaghetti code is used to refer to how things like goto's transfer control all over the place- much like how you don't really know how a single strand of cooked spaghetti weaves it's way through a pile, it's hard to see how control is transferred and where with "spaghetti code". Since there is no execution and no "control structures" in HTML (it being a mark-up, not programming, language, after all) it's impossible to have "spaghetti" HTML.

Quote
I started programming on Basic in 1984 and when I learned C++ in college the professor was like "NOOOOOOOOOOOOO .... Ok so you found out that GOTO exists in C++, We dont teach it so NEVER USE IT"

That is an equally inept opinion, if you ask me. It really drives home the divide between how Programming languages are designed.

There really are two camps: One camp thinks that programmers should be given as many tools as possible, and if they put them together badly, it's their fault. The assumption being that programmers are smart, most of the time. The other camp is the one that thinks the language should be designed so that it is more difficult to make MISTAKES.

They both have their good points. However, something worth noting is that what is and is not a mistake is really up to the language designer.

goto as a keyword is present in C, C++, C#, and a myriad of other languages. These are languages typically designed with the  "give the programmer as many tools as possible" mindset. Other languages, like Java, have a goto keyword, but it is unused- the designers are "protecting" people from it; java is a good example of the latter, since it also lacks Operator Overloading, Extension methods, Lambda's/Delegates, iterator methods, co-routines, and countless other things that have become more and more prevalent as our more popular languages inch their way up to having the same power as Lisp.
729.

Solve : Why do I need SORCE CODE for my website???

Answer»

Hi Everybody,

I never got a copy of the source code when I had my website built few months ago. It`s an asp.net website.
I`m TRYING to understand if I really need them or having a copy of the website files (from my FTP) is enough.
Some people are  telling me that if I EVER need in the future to change or modify or update my website I`ll need the source code, because probably the codes on the FTP are compiled...
Others are telling me that any developer can work from the files that I already have copied and if necessary they can always use a DECOMPILER...

What`s your opinion/suggestion?

Much appreciated

thank you

S.ASP.NET compiles. The stuff on your SERVER is compiled.

Could somebody make changes to your site without the Source? yes, as you mentioned, they could decompile it.

But this removes loads of information from the original source; code comments are gone, for example. Many variable names as well, which are helpful for establishing a cognitive flow. Making changes to a website by decompiling what is currently there is analogous to trying to rebuild a racecar after a car CRASH. You have all the parts, but so many of them are unrecognizable and useless, and when you put in your own you find problems.

Basically if you try to get a developer to make changes to your site based on the decompiled assemblies, it will cost probably a lot more.

730.

Solve : IIS 5.1 or latest Apache for ease of configuration and learning PHP??

Answer»

Underlined my questions to make them stand out among my babble...LOL

Will IIS 5.1 using Windows XP Pro SP2 OS work best for learning and testing modern PHP "offline" or should I go with latest Apache?
I have never never installed/configured microsofts IIS before, and in the past used Apache because its free. I came across a website about SETTING up IIS 5.1 using oem Windows XP Pro disc and was surprised that its basically free if you already have XP Pro which I do. But before installing and configuring IIS 5.1, I am concerned that it might not have modern handles for modern PHP routines.

Do I have to worry about a mismatch using an older IIS 5.1 with modern PHP or will IIS 5.1 work with all PHP 5.4.9 instructions?
In the past I have used Apache for serving up webpages/sites on private web servers, and when it comes to HTML and Apache its dirt simple to set up. But when trying to get perl_mod working etc it was nothing but headaches for me, and not as simple as removing the # to enable, and even following instructions online something still wasnt right because HTML worked, but perl wouldn't function so something was missing.

So reading online with many others having ISSUES with Apache and trying to ger perl and PHP modules working, I am thinking maybe I should avoid Apache and use IIS for PHP which I will be learning hands on in my free TIME on a spare computer.

http://www.wikihow.com/Configure-IIS-for-Windows-XP-Pro This site makes it sound dirt simple to get IIS 5.1 working in 23 steps. I think its funny that all this time I thought IIS was only available in MS Server Products, as for the last time I came across it but didn't use it was Windows 2000 Server. 

If I should use latest Apache instead, is there any step by step instructions that work with modern Apache to get the perl and PHP modules functioning? I have come across many older ones, and when you try to use the older instructions with mismatched more modern version httpd.conf file instructions, it leads to no perl_mod functionality because the instructions are wrong for newer Apache configuration. ( Mentioning perl here only because I had issues with Apache and perl in the past, and assume that it will be just as much of a problem with PHP.) It's too bad there is no wizard or configuration interface for Apache to help you enable features. A configuration interface should be dirt simple since the httpd.conf file is basically a simple text file. Maybe I should make a Free use Apache Configuration Tool in C++ that makes a custom httpd.conf file that "works" when you want certain modules enabled. LOL  But the only way to do that is to know how to successfully get the modules to work in the first place and with Apache its been nothing but frustration. 

Hopefully this is the correct place for this as for it touches on Programming, Windows XP, and I thought more strongly fit in with Web Design System Configuration, for learning dynamic web design techniques which I am very interested in.PHP works best, IMO, on the LAMP stack. IIS is more for ASP/ASP.NET. Apache on Windows is a bit of a gray area, IMO it works best on Linux, though.

IIS doesn't support PHP out of the box, either. You can find information on getting it setup in both IIS 5.1 as well as 6.0 here.

The same site has instructions for getting PHP working with Apache on Windows as well as Apache on Linux.I use XAMPP and it works pretty well, it sets most of it up automatically and everything is (by default) contained in the C:\xampp directory, with public files in C:\xampp\htdocs\. For basic php+mysql authoring and testing it works pretty well, but for more advanced stuff you'd probably want a dedicated server.In the past months i have been rather fond of EasyPHP... 
http://www.easyphp.org/Thanks Waffle .... I actually ended up not going the route with IIS because it wasnt working as easy as the setups online stated IIS would be with PHP.

I ended up installing EasyPHP about a week ago, but it didnt work at the get go on Windows XP Pro SP2. I installed it and it was broken due to dependencies that were not met by clean build XP Pro SP2. Kept getting errors at start up of services for Apache and mySQL. Searched Google to see what these errors were since it doesnt tell you its Apache or mySQL. Found others with same problems that stated try this/try that. Some stuff I tried didnt CHANGE the issue, but other things did.

In the end I found out that Apache that is bundled with EasyPHP has VC9 dependencies that were not met. So I had to install the redistributable C++ package. I also had to install .Net 3.5 Framework as well as Windows Redistributable Installer 3.1 as linked here: http://www.microsoft.com/en-us/download/details.aspx?id=25 to make EasyPHP run properly, and the Windows Installer 3.1 Redist had to be run prior to the .Net3.5 framework install if my memory is correct.

*If I had connected this system to the internet and performed 100+ updates and brought it forward to Windows XP Pro SP3, EasyPHP probably would have installed without any issues, or only issue being the VC9 redist for Apache.

But this is an OFFLINE Pentium 4 2.0Ghz with 1GB Ram eMachine (motherboard) computer and so I dont need it patched to latest and it actually runs faster at clean build Windows XP Pro SP2 fresh from CD install vs patched in which lesser Ram is available and it seems LESS efficient in operation (there is a performance hit that is noticable... slows down at latest SP3 and all patches )

731.

Solve : Training of HTML programming help!?

Answer»

Hi, I am new in web development field and i want to learn some of the HTML programming. For that i need advise where do i begin to enhance my SKILLS. Is there any online resource where i can available to understand the knowledge of HTML programming. I desperately wanted to learn as my aim is to being a web developer. Good morning wilson.eric and welcome to CH

This web site does offer some free HTML schooling http://university.mistupid.com/

I don't think that HTML is considered programming language I believe it is considered a Technologies / markup language.

Hopefully this will HELP you, MIKE   
http://www.w3schools.com/If you want to learn youtube has some good video's if you look.  There is a book I got which, was REALLY good but, I havent messed with any of this in a while.  Look into CSS since that seems to be the new treadThis WEBSITE does provide schooling on HTML. But they are not free.
http://www.oreillyschool.com/
Hope this may help.

732.

Solve : Web Development & Design suggestion.?

Answer» Don't know is this the right place to post this but as you ARE the geeks so I am posting.


I am new in the web design and development field.
I need your suggestion to build my career in this field.
I need:

1. A good certificate approving me as developer.
2. A good place where I can talk with professionals (like a forum.)
3. A good place where I can get jobs.

(..............as I am in India, I need to do all these things over INTERNET................)

-please help.1. Microsoft Certification (MCP) as a web developer is typically a safe bet, widely RECOGNISED - though expect to pay for your exams (these are usually conducted in person at an exam centre, maybe there are some in your area).
2. I'm sure you've heard of http://www.stackoverflow.com, it's not too uncommon for people to be hired/contacted for work on their stackexchange merits alone. ALSO it helps you to keep up-to-date with the latest practices/technologies in web development.
3. Know next to NOTHING about telecommunting I'm afraid, ASSUMING that is what you're after?
733.

Solve : How to get text wrapping??

Answer»

What CSS do I use to get text to wrap around a picture? I PUT a picture inside a div tag WITHIN the main div tag, and now all the text that I'm typing in the outer main div tag appears below the picture.Float the picture either to the left or right.

Code: [SELECT]IMG {
   float: left; /* or right */
}
Add the style attribute to your image tag:

Using HTML
Add the align attribute to your image tag:

734.

Solve : Sub-menu transparency issue?

Answer»

I’m building a website using Dreamweaver CS6 on a MACINTOSH. On my menu bar
the sub menu CONTENT area is transparent. I’m trying to put in a semitransparent color into the content field of my sub-menu and can’t figure out which new property to ADD and where in the CSS rules it should be added. I’ve tried many different workarounds but I’m only able to change the text color in a content field. Any ideas would be helpful thanksAssuming u used an unordered list for your sub menu you could add a class to the submenus (IF U DON'T HAVE ALREADY) Then in your css file add this: Code: [Select].classname { background-color:#ccc; opacity:0.8; }
I ask that u post some of your code to HELP us better understand what u r doing.
Thanks a lot, I've got it working properly now. Next time I will include code examples as per your request.

735.

Solve : Message board creation software/hosting - help??

Answer»

Been reading this book, "Building Social Web Applications" by Gavin Bell, O'Reilly publications, so far from reading chapters 1 - 3, I believe I understand that creating/maintaining my own website involves a number of things, among which are key questions (for want of a better way of putting this, perhaps):

--what type of site do I want?

A: a message board;

--who's my audience?

A: users of Adobe/3D modeling/PC game creation/adventure gaming application/computers/networks, software,

--am I encouraging new social relationships or supporting existing ones?

A: supporting existing relationships.

--what types of social content will my site cater to?

A: Adventure/other gaming/creating movies/photos/graphic novels/computer/networking repair/upgrading/hardware and the discussion of these subjects,

--any special interest board?

A: Yes, a special forum devoted to Christianity/how these other interests are centered around Christianity (since my website will be centered around Christianity/the Church, as virtually all the adventure gaming message boards i currently belong to do not ALLOW discussions pertaining to Christianity/the Church.

Also, I understand for it to thrive/retain the people that come to my site, the site has to have a warm atmosphere for people to want to hang out at my site where they can post messages and expect/receive future return for these messages.

(this is all I can think of at the moment, as I've READ I need to keep my website small and simple when first starting out.)

I believe that there are some ISP's that allow for a free place on the web in which to host such a website, I shall have to ask our ISP sometime regarding this.

My website will allow for posting images/youtube videos

This site will not be for some time down the road, I need to take a server class/website class at school in ORDER to learn the basics, when the website is launched, I hope to invite all the members from the other message boards where I'm a member to join my new website (note) I'm not trying to advertise, this is only another hobby (if it can be considered a hobby, that is).

To tell the truth, I know next to nothing (except what little I read in that book at this point) about KEEPING a website/message board, thus I'm asking about exactly what's involved, getting people to volunteer as the mods - I'll be the admin/computer/network tech support (after I gain enough experience, that is), my responsibilities, etc,

So considering all that I've mentioned, what website creation software is the best to use?

Is there any open-source website/message board creation/hosting software available for free?

Any (and all) input will be appreciated in response to my questions pertaining to this website of mine (especially as I understand the need to plan, plan & plan/do my HOMEWORK beforehand).

Many thanks in advance.

736.

Solve : Running html to test it via my browser - beginner?

Answer»

Quote from: BC_Programmer on June 15, 2012, 02:24:58 AM

yeah my question was more the why on the human side, I just wonder if it was a purposeful omission or whether it was simply overlooked.

I strongly suspect the latter.  The dev forums are failrly quiet on the subject.  I can't think of any reason why someone would deliberately allow <em> and omit <strong> (unless they have a pathological dislike of HTML elements with more than a couple of letters)!< em> is probably USED as < i> is not valid XHTML, whereas the substitution for < strong> is just < b> (which is still valid) so they probably DECIDED < strong> wasn't needed. Quote from: KPAC on June 15, 2012, 11:17:29 AM
< i> is not valid XHTML
The i entity is PRESENT in the XHTML-1.0-Strict document type definition.

Quote from: BC_Programmer on June 15, 2012, 12:17:54 PM
The i entity is present in the XHTML-1.0-Strict document type definition.
Hmmm...always thought they replaced it with < em > in XHTML, not that XHTML is that important ANYMORE...Thanks to every one
737.

Solve : HTML5?

Answer»

*facepalm*

Try learning ActionScript. It's like writing a GUI-based calculator in DOS.

I'm not sure why we're so worried about speeds anyway - we're only talking milliseconds in the difference. Quote from: kpac on January 15, 2012, 05:59:10 AM

I'm not sure why we're so worried about speeds anyway - we're only talking milliseconds in the difference.

Exactly... and that would be the cumulative time. And if we are talking about just a few bloody tweens, I hardly see how somebody could prefer flash. (which wouldn't be faster anyway*)

There are several key points to summarize.

-Javascript is a plain-text language that has to be interpreted by the browser.

-Veltas, at least, thinks that there should be some sort of "Binary code" that is "W3C approved" (whatever that means) for use on the web at large.

-But the reason we don't do that, is that Binary Blobs are inherently unsafe. What is it, anyway? Some sort of byte code? machine code? Just saying "Binary standard" was a dreadfully vague thing to say. Bitmap FILES are a "Binary standard"  but I don't see them as being very useful for animation.

-Currently, the security issues are constrained by the browser's javascript interpreter. This would simply move that to a "new" interpreter for this Binary blob (or remove security and platform independence altogether if it was just a blob of machine code that could be arbitrarily run by a browser, Web-based ActiveX All over again... but W3C approved!) And of course the browser would still need a javascript interpreter anyway, so all this would do is multiply the attack surface- for no real gain whatsoever.


*Allow me to explain why Flash will always UNIVERSALLY be slower than javascript,CSS/HTML:

First, it's always a plugin. That means it always has to be loaded, for any Flash-based content to be viewed. various implementations of the plugin could easily change behaviour. Also, most browser plugin architectures on most windowed desktops have to create a Child window for it. This has several ramifications- first, it means that scrolling the page will require more work by the browser to properly clip the flash video being shown (otherwise it would appear atop other controls). You can already see this as a frequent symptom with Flash video- "native" HTML content, without ridiculous and sometimes browser-specific hacks, appears on top of everything else, simply by virtue of it using a window handle (on windows, or equivalent on other systems) and being a full-fledged OS managed Window, whereas the rest of the content is rendered as part of a larger frame. HTML5 would put those rendered elements as part of the rendered frame, making their actions, responses, and general interactions scriptable using javascript. And, by eliminating a Machine-Language binary from the browser, you've eliminated the biggest attack surface present in browsers for over a decade. Is it slower? well, maybe. But you know what? There is no point being minutely faster if it's inherently insecure. And I REPEAT, Adobe Flash is the primary reason that browsers now sandbox plugins. Quote from: BC_Programmer on January 15, 2012, 05:32:17 AM


Firstly, BC, I think you need to get over yourself.

Secondly, even if you use ActionScript all over an animation or for a site, it's still not taking up most of the processing time. Quote from: Veltas on January 15, 2012, 08:32:04 AM
Firstly, BC, I think you need to get over yourself.
What?

You said that "not all flash has actionscript"

Except it does. The fact is that Shockwave/Director/Flash itself, when creating tweens and other content in the editor, are basically going to compile that into actionscript. Just because a swf doesn't have user-created actionscript doesn't mean that it magically doesn't have any at all; any and all actions- animation or otherwise- in a flash video are done via ActionScript, or rather, actionscript bytecode.
It's sort of like saying that not all Windows applications have a WinMain() function. It's only right if you don't look beneath the surface; all Windows applications have a WinMain function, just most languages and libraries hide it beneath their runtimes. Similar with ActionScript; just because you didn't add it yourself doesn't mean it isn't there.


Quote
Secondly, even if you use ActionScript all over an animation or for a site, it's still not taking up most of the processing time.
This discussion would be a lot easier if you had used any of the involved technologies at some point.

Quote
It's sort of like saying that not all Windows applications have a WinMain() function. It's only right if you don't look beneath the surface; all Windows applications have a WinMain function, just most languages and libraries hide it beneath their runtimes. Similar with ActionScript; just because you didn't add it yourself doesn't mean it isn't there.
An INTERNET comparison to that would be the class contructor function in PHP (or Java) - you can create one if you like but one will be added automatically if you don't. Quote from: kpac on January 15, 2012, 09:08:32 AM
must
you can create one if you like but one will be added automatically if you don't.
not to tarnish your point, but there is a glaring exception with java-
you must define a constructor in any class which derives from another class that doesn't have a parameterless constructor. For example:

Code: [Select]//a.java
public class a{
    public a(int parameter){

    }

}

//b.java
public class b extends a

}

as that is, b.java will not compile, since it cannot automatically generate a parameterless constructor on account of such a automatically generated constructor simply consisting of a call to the parameterless superclass constructor, which in this case doesn't exist. Now you can of course create your own parameterless constructor which calls a superclass constructor with parameters, but in this case it can't be automatic.

of course if you were really referring to javascript, than I have no idea of the semantics involved, though I'd be rather disappointed that you would confuse them

Totally off-topic, but am I the only one that thinks interfaces should totally allow for a guarantee that certain constructors be present? I mean, I can throw an exception if reflection doesn't find the appropriate constructor, but it would be nice to have some compile-time checking, since that is sort of the point of using interfaces to begin with...Yes, I was talking about Java.
I'm learning it at the moment in college, so not quite up on all the points yet - including the one you mentioned.

HTML5 is a cooperation between the World Wide Web Consortium (W3C) and the Web Hypertext Application Technology Working Group (WHATWG).

WHATWG was working with web forms and applications, and W3C was working with XHTML 2.0. In 2006, they decided to cooperate and create a new version of HTML.

Some rules for HTML5 were established:

New features should be based on HTML, CSS, DOM, and JavaScript
Reduce the need for external plugins (like Flash)
Better error handling
More markup to replace scripting
HTML5 should be device independent
The development process should be visible to the public
738.

Solve : Ways to learn PHP??

Answer»

phpbuddy.com is a best website to learn PHP and you can also clear your doubts from w3schools.com i also have good experience in it.Alright, I've narrowed down what I'm searching for a tiny bit, and that birthday is 3 days away. Anyone know any resource that has EXERCISES, complemented with an answer key, that make me apply what I've learned? You know, the exercises start out easy, then slowly get harder. I think part of the PROBLEM I'm having with learning PHP is that I have no idea where to start practicing it, so it'd be helpful to have something telling me what to do. I didn't see anything indicating exercises in any of the resources posted on this thread so far.

And am I going to need to BUY anything outside of a possible book to learn PHP? Quote from: Wuai Bel Ree on July 27, 2012, 01:31:53 PM

am I going to need to buy anything outside of a possible book to learn PHP?

I should think not, there's plenty of free PHP hosting out there. Although for TESTING, I have IIS 7.5 with PHP 5.3 and MySQL 5.5 on my laptop to help me out with all that. Sorry if I'm too late I'm thinking of getting these three books. Does anyone have good/bad experiences with any of 'em? Are they good for a beginner?

PHP 5  for the Absolute Beginner
http://www.amazon.com/PHP-MySQL-Programming-Absolute-Beginner/dp/1592004946/ref=cm_lm_fullview_prod_2/102-7421431-9620950

PHP For Dummies
http://www.amazon.com/PHP-MySQL-Dummies-Computer-Tech/dp/0470096004/sr=8-1/qid=1170178118/ref=pd_bbs_sr_1/102-7421431-9620950?ie=UTF8&s=books

Web Database Applications with PHP
http://www.amazon.com/Web-Database-Applications-PHP-MySQL/dp/0596005431/ref=cm_lm_fullview_prod_3/102-7421431-9620950I have bought and read this book and I found it very helpfull.
http://www.amazon.com/gp/aw/d/1449325572/ref=mp_s_a_1?qid=1358101239&sr=8-2&pi=SL75
Only downside I found was it didn't cover Ajax.
739.

Solve : help with some html code?

Answer»

I am TRYING to use a button that adds text field boxes to a WEB site. I got the code to work but when I copy and paste the code to add another button it works but when HITTING the second "add text" button the text field appears under the first "add button" not the second "add text" button how do I change the code to make the text FIELDS APPEAR under the second "add text" button heres my code:

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

http://www.w3.org/1999/xhtml" >

    Add Button

740.

Solve : Admin a website...?

Answer»

Hy all. Supposing that I have to admin a website(changing/updating/uploading photos/titles/prices) -for a JOB   how could I do that ?  What skills are required? And what PROGRAMS should I use? I WOULD really appreciate some help. Thanks a lot !


[I'm sorry for the given site, it's just an example and not advertising is intended].

No problem - I removed the name of the site (Allan).You need access to either the control panel for the site or FTP access. Either will do.To add to kpac's comment, if you use the Control Panel provided by the web hosting service to update pages, you can do that in your web browser; in other words, you can update the web pages by accessing them on the server, not on your computer's hard drive; this requires no special software on your computer. Of course, if photos are to be uploaded, they would most LIKELY come from your hard drive. 

If you use FTP software to access the web page files, this usually means you have the files on your hard drive, you make the editing changes to them on your hard drive, and then you upload the updated page to the server via your FTP access.  Under this approach, you'll PROBABLY want some kind software on your computer that you would use to create, edit, or update pages.  To be more specific about this, we'd need to know more about your skill set and how you plan to approach this.

741.

Solve : online form and online data collection?

Answer»

Hi
I want to collect the participants  of an online psychology study to 56 words, each one to appear in one page with a blank area to collect the responses in text format. In addition, I have  prepared the pages in such a way that each one present each word stimuli for 30 seconds.

The pages are ready now and what i am looking for is how to SETUP the pages/website in such a way that the I could have the responses to be output in a spreadsheet like excel.

And advice is really appreciated.

Many have already done that. Why not just use stools others have crated?
The main difference between Excel and HTML, in a simplified way,  is the Excel is offend as  interactive and DYNAMIC wile HTML is often static.

Do a search on this key Phrase
convert excel to interactive web page
Here is one place to start.
http://www.softatoz.com/how-to-excel/convert-excel-spreadsheet-to-web-page/

Please don't ask me to do it for you. I have a two handicaps.
A three-year-old grand child
and a  little dog.

Which keep me buzy 




Thanks a lot for the valuable comments. I have tried to see the excel worksheets in FORM of the webpages, that is fine. Indeed the google docs offer this FACILITY and that very well. The only problem is tuning the pages to be presented for 30 seconds each one that I am not sure how to do that.

This is why I used the http://wextor.org/wextor/en/ to create the experiment and now looking to see how to publish it in the web so I could have the respondents answers collected.

Glad to see you are making progress.
There is a standard HTML thing that goes to another page after a time lapse. It is the refresh object. It is a meta gizmo. Alto I have used it fort years, I can not remember then syntax.
Here is one from my collection.
Code: [Select] <meta http-equiv="refresh" content="4;url=./wpk/">
It has to be in the META section at the top of a page. This one waits just 4 seconds and the goes to a directory named wpk under the current directory.

Hope this is of some help.
Of course, .you can always do it with JavaScript.
Thanks for the kind attention and for  the comments. Indeed,  I have no problem in timing as I have done it via wextor. Just need to know how to GET my website connected to spreadsheet. I am trying to use the html(s) i have prepared so far.

Cheers,
MasoudSorry I can not offer direct help. Microsoft supports use of Office software by means of ASP code. This kind of stuff  is called "Server Side Program" because the server itself grinds the code and gives the output over the network.

http://support.microsoft.com/kb/257757
Considerations for server-side Automation of Office

In general, it means almost anything you do with office,  can run over the Internet, even o n PCs that do not have MS Office installed.

742.

Solve : HTML for white space in paragraph?

Answer»

I write children's books with lots of images and want to upload them to Kindle. I'm learning some basic HTML in order to do this. I now have a white blank line between paragraphs which is FINE but  on Kindle there seems to be white spaces (blank line space) between the lines within a longer paragraph. My paragraphs have no space between the lines within the paragraph. Is there some way to fix this? Yes. You sound like you are new to HTML and your are a professional. Rather than spending a lot of time learning HTML code, learn how to use a editor that let you freely compose what your want.

In general, when you have a STYLE you like, a professional  editor will create CSS that will keep your style in a SET of documents. An old favorite is Dreamweaver, which PART of  Adobe.

http://success.adobe.com

Now as to the details, one old trick is to create a transparent GIF file with just one color and then stretch it to fill a cell in a table without visible boarders.
 CSS line-height property.

Code: [Select]p {
   line-height: 1.5em;
}

743.

Solve : Unicode characters in a C.R.U.D php application.?

Answer»

Hey there!

I'm having problems getting unicode characters to work. "ä, Ä, ö, Ö, ü, Ü, õ, Õ" to be more specific.
The html elements in the php file are displayed correctly but when it's READING data from MYSQL database, it GIVES me weird characters.

Instead of "ü õ ö ä" I get "ü õ ö ä"
It doesn't show the unicode characters in my php table if I enter data VIA php form or via mysql but characters are shown correctly in the mySQL table, doesn't matter what I use to enter the data.

http://img836.imageshack.us/img836/7277/watway.png
Notice how it displays the unicode characters correctly in the bold text but not in the data field?


Here's the code of one php file.

Code: [Select]<?php
mb_http_output('UTF-8');
mb_http_input('UTF-8');
mb_language('uni');
mb_regex_encoding('UTF-8');
ob_start('mb_output_handler');
header('Content-type: text/html; charset=utf-8');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<TITLE>Andmete kuvamine</title>
</head>
<body>
<?php
include 'config.php';
$sql="select osakond, soetusaasta, it_number, tooteruhm, mudeli_nimetus, sn, riigivara_nr, inventaari_nr, maja, ruum, vastutaja, markus, id, kasutajanimi from norse5_proov";
$rs=mysql_query($sql) or die($sql.">>".mysql_error());
$num=mysql_num_rows($rs);
if($num>0){
?>
<table border='1'>
<tr>
<th>Osakond</th>
<th>Soetusaasta</th>
<th>IT Number</th>
<th>Tooterühm</th>
<th>Mudeli nimetus</th>
<th>SN</th>
<th>Riigivara nr</th>
<th>Inventaari nr</th>
<th>Maja</th>
<th>Ruum</th>
<th>Vastutaja</th>
<th>Märkus</th>
<th>ID</th>
<th>Kasutajanimi</th>
</tr>
<?php
while($row=mysql_fetch_array($rs)){
extract($row);
?>
<tr>
<td><?php echo $osakond; ?></td>
<td><?php echo $soetusaasta; ?></td>
<td><?php echo $it_number; ?></td>
<td><?php echo $tooteruhm; ?></td>
<td><?php echo $mudeli_nimetus; ?></td>
<td><?php echo $sn; ?></td>
<td><?php echo $riigivara_nr; ?></td>
<td><?php echo $inventaari_nr; ?></td>
<td><?php echo $maja; ?></td>
<td><?php echo $ruum; ?></td>
<td><?php echo $vastutaja; ?></td>
<td><?php echo $markus; ?></td>
<td><?php echo $id; ?></td>
<td><?php echo $kasutajanimi; ?></td>
</tr>
<?php
}
?>
</table>
<br>
<a href="update.php">Uuenda andmeid</a><br>
<a href="delete.php">Kustuta andmeid</a><br>
<a href="insert.php">Sisesta andmeid</a><br>
<br>
<a href="index.php">Algusesse...</a>
<?php
}else{
echo "Andmeid ei leitud";
}
?>
</body>
</html>A friendly bump!

744.

Solve : How to Add a Favicon to your Site?

Answer» Favicon is right, but spell check don't like it.

Years ago I did this and it did not always work.
Here is an article that explains how.
http://www.w3.org/2005/10/howto-favicon

If you are diligent, you can get the browser to show a tiny icon in the ADDRESS line.

Here is my question, Is the the only or best way to get the favion?
(From http://en.wikipedia.org/wiki/Favicon#How_to_use)

Use of a PNG format favicon does not seem to be supported in IE; Only a rel attribute with the value "shortcut icon" and a .ico format icon will work. Internet Explorer ignores rel="icon" completely (IE9 did last time I checked). I notice in the table that it's "not in citation given," so I looked at the citation. Microsoft's documentation PAGE doesn't explicitly say that rel="icon" is unsupported, but because it's missing from the exhaustive list including proprietary rel values while "shortcut icon" is INCLUDED, I'd say it probably isn't supported (and testing I did confirmed that a while back).I use this in my main site's index.php:
CODE: [Select]<LINK rel="icon" type="image/png" href="http://bc-programming.com/favicon.png">
Works on IE8 (Win7) and IE10, Firefox (18.0.2), Chrome(25.0.1364.97), and Opera(12.14). Quote from: BC_Programmer on February 27, 2013, 06:46:32 AM
I use this in my main site's index.php:
Code: [Select]<link rel="icon" type="image/png" href="http://bc-programming.com/favicon.png">
Works on IE8 (Win7) and IE10, Firefox (18.0.2), Chrome(25.0.1364.97), and Opera(12.14).

I was about to wonder why it worked on your site in IE8 where the favicon I tried to use didn't. Then I saw that you also have a favicon.ico in the root of your site, which I was unable to use for my project because I didn't have access to the root of the domain. Quote from: TechnoGeek on February 27, 2013, 06:48:56 AM
I was about to wonder why it worked on your site in IE8 where the favicon I tried to use didn't. Then I saw that you also have a favicon.ico in the root of your site, which I was unable to use for my project because I didn't have access to the root of the domain.

I had completely forgotten about the .ico file. I bet I added it when the favicon wasn't working and I googled for why that would be. Quote from: BC_Programmer on February 27, 2013, 09:32:52 AM
I had completely forgotten about the .ico file. I bet I added it when the favicon wasn't working and I googled for why that would be.
Now you see why I asked.
Why is it after all this years there is not clear, right documentation on a little thing?

Thanks for your help. This for a family member, but still I want to do it right.
745.

Solve : PHP login field check.?

Answer»

I have this PIECE of code here and what it's supposed to do is to check if the user has selected their name from the dropdown list and then pressed "submit". If the user hasn't chosen his/her name then it should give a message saying "Please select a name".

For some reasons this isn't working.

Code: [Select]<?php
include 'config.php';

if ($_POST['kasutaja']) {
$_SESSION['user'] = $_POST['kasutaja'];
}
else {
echo "<p style=' font-size: 50px; text-align: center;' id='tkt'><br><br>Palun sisesta enda nimi</p>";
echo "<br>";
echo "<center><form method='link' action='index.php'>
<input id='nav' type='submit' style='padding: 10px;' value='Tagasi algusesse'>
</form></center>";
}
header('Location: search.php');
?>If you want to DISPLAY the message before sending anything to the web server, you should use a client-side script LANGUAGE (the best supported is javascript.) instead of PHP.

It's hard to tell what's going on in this small amount code without seeing more of it, but you are using the header() command after sending  output (the echo command here). That's wrong and will usually cause an error. What is the purpose of the Location: redirect anyway?

The echo commands need to go in the same page as where the original form is displayed to SHOW the message there, or on this page but with the header() call moved to show the message on a separate page after clicking submit.What exactly is the error?It's working when I do not enter the name. It gives me the "please enter your name" but if I do select the name, it doesn't redirect me to search.php as it should. I recorded a video as well of what it's doing.

http://www.youtube.com/watch?v=zqI-d83yUsg


index.php
Code: [Select]<?php
include "config.php";

$query = mysql_query("set names 'utf8'");
mb_http_output('UTF-8');
mb_http_input('UTF-8');
mb_language('uni');
mb_regex_encoding('UTF-8');
ob_start('mb_output_handler');
header('Content-type: text/html; charset=utf-8');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<head>
<title>Sisene</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
<link rel="stylesheet" type="text/css" href="css/index.css">
</head>
<body>
<h1>Sisselogimine</h1>
<hr>
<div id="login">
<form name="form" action="user.php" enctype="multipart/form-data" method="post">
<div id="inputtitle">Sisesta enda nimi:</div><br>
<select name="kasutaja" id="kasutaja">
<option> </option>
<option>Kalle Kaalikas</option>
<option>Pirjo Põim</option>
<option>Janar Pilv</option>
<option>Erlend Anderson</option>
<option>Sille Suursaar</option>
<option>Kaisa Viljar</option>
<option>Liis Kurvits</option>
<option>Lenne Kontor</option>
<option>Lindsay Meadows</option>
<option>Ronnie Coleman</option>
<option>Marek Kalmus</option>
</select>
<input type="submit" name="submit" value="Sisene">
</form>
</div>
</body>
</html>


User.php

Code: [Select]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="css/search.css">
<title>Algus</title>
</head>
<body>
<?php
include 'config.php';

if ($_POST['kasutaja']) {
$_SESSION['user'] = $_POST['kasutaja'];
}
else {
echo "<p style=' font-size: 50px; text-align: center;' id='tkt'><br><br>Palun sisesta enda nimi</p>";
echo "<br>";
echo "<center><form method='link' action='index.php'>
<input id='nav' type='submit' style='padding: 10px;' value='Tagasi algusesse'>
</form></center>";
}
header('Location: search.php');
?>
</body>
</html>
Yeah, the problem is in user.php.

You cannot use the header() function after you have outputted HTML to the page. I also think (but not sure) that you can't initiate the $_SESSION variable after outputting HTML either.

Instead of using the header function there you could just use the following:
Code: [Select]<script>
window.location.href='search.php';
</script>
Thank you kpac! That somewhat worked. I do not get a blank page anymore but now if I don't select a username from the list it displays the error page really quickly, like 1/4th of a second maybe and then redirects to the search.php page. When I do select the name, it's alright.

Sorry but I'm a complete rookie at PHP. I can UNDERSTAND the code but I do not know how to write it entirely by myself.
This is here is beyond my knowledge.

746.

Solve : I have added a contact form 7 in my website it not working?

Answer»

I have ADDED a contact FORM 7 in my WEBSITE it not WORKING please help me [...] is my websiteWeak attempt at SPAM.

747.

Solve : Application with database for consultancy?

Answer»

Hi fellows , I am running small consultancy , I have excel sheets , sometime a single excel sheets is used by 3 and they all want to ADD comments , but it says that it is used by other , can I have any one application so that we can USE it on all the computer and keep adding data and which should be secure , and easily accessible

any help would be appreciable

 Have you already read this? Does is apply to your project?
Share a workbook - Excel - Office.comYou could try Google Docs Sheets feature; it's an online spreadsheet that would ALLOW multiple users to add comments.  It might still display an alert if two users happen to be trying to add a comment at exactly the same time.  I'm really not sure how it will work at such a moment but I'm inclined to think it MAY be more adaptable to your purpose than Excel.  A search on google sheets should land you in the RIGHT place.

748.

Solve : Drop Down Menu not hovering correctly?

Answer»

Below is the code I put TOGETHER. It is formatted how I would like, but I cannot get the code to make the sub-text hover when hovering over the main topic. Does anyone have any suggestions?


#sddm
{   margin: 0;
   padding: 0;
   z-index: 30}

#sddm li
{   margin: 0;
   padding: 0;
   list-style: none;
   float: left;
   FONT: bold 20px georgia}

#sddm li a
{   display: block;
   margin: 0 1px 0 0;
   padding: 9px 10px;
        padding-color: #000043;
   width: fit;
        height: 27px;
   background: #A6AED9;
   color: #000043;
   text-align: center;
   text-decoration: none}

#sddm li a:hover
{   background: #49A3FF}

#sddm div
{   position: absolute;
   visibility: hidden;
   margin: 0;
   padding: 0;
   background: #EAEBD8;
   border: 1px SOLID #5970B2}

   #sddm div a
   {   position: relative;
      display: block;
      margin: 0;
      padding: 5px 10px;
      width: auto;
      white-space: nowrap;
      text-align: left;
      text-decoration: none;
      background: #CCCCCC;
      color: #000043;
      font: 20px Georgia}

   #sddm div a:hover
   {   background: #CCCCCC;
      color: #000043}




749.

Solve : Need Help with hooking or connecting to video embed codes?

Answer»

hi , i am currently working on a family site and was WONDERING how do i connect an button to videos to load in one page but different videos load in same page when someone clicks a different button . can you please explain to me how i can connect the button to the VIDEO embed code ?What do you mean by "connect"?what i mean by connecting is to have iframe load when u click a button and then when u click a different button another video opens on the same page i wanna know how to connect video embed CODES to img buttons to load on the same page but when u click the different buttons different videos OPEN

750.

Solve : Code for a website page?

Answer»

I don't know if anyone can help me but im after some code for a webpage
I am trying to create a page on a website where you can customise a t-shirt where people pick the shirt style, the shirt color & the pocket they want and then go to the CHECKOUT 
I don't know if it is easier to embed a database with a UI or just to paste the code in the right place
(p.s this is for a friend so it would help if it was easily explained over the internet)

hope i have given enough DETAILS What I would do is have a database table of shirts that stores the colour and style as well as a location to an image of a shirt in that colour.  You could then have a second table of pockets where it would store the style of pocket and its colour as well as a location of the image of that pocket.

You could then use the method DESCRIBED here to overlay the image: HTTP://stackoverflow.com/a/6547828 ALTHOUGH I suggest you deal in PNG to allow transparency.

I would then use AJAX so when a user changes an option, it sends their style to the server that picks the image for the shirt, overlays the pocket onto it and returns the image to be displayed.  jQuery is very good for dealing with AJAX so I recommend you use that.

Hope this helps, I imagine others may be able to give more information or other ways of doing this.

If you wanted to keep it even simpler and have limited colours, styles and pockets, you could just create an image for each combination and just return that, this would prevent you having to deal with image manipulation in PHP.