JameB 66 Junior Poster

Could be that the information from the 1000 inputs is taking too much time to transfer and the process is killed due to exceeding the time limit.

One temporary solution would be to break the pages into two or three or however many pages, with each page having ~1000 inputs.
.
.
.
.
Just wondering though, why do you need that many inputs anyways?! Do you think people will enter 500 people at the same time?

JameB 66 Junior Poster
<div id="right">
    <div id="grid" class="right">
    </div>
</div>

You should have id="right" instead of class="right".

Also, if you're using float: left and float: right, make sure the width is never exceeding 50% of the screen. (I suggest 45%)

JameB 66 Junior Poster

Data Input method: there are more like these but this is the general idea...

<input type="radio" class="check" name="gen_company_name" value="other" <?php $data = file_get_contents("http://localhost:8080/core/data/form_generation/gen_company_name.txt"); if ($data == "other") echo "checked"; ?> />Blank<br/>

then to send the data to the script that saves:

<script type="text/javascript">    
        window.onbeforeunload = confirmBrowseAway;

        function confirmBrowseAway()
        {
            document.forms["gen_form"].submit();
        }

        window.onload = function()
        {
            document.forms[0][0].focus();
        }
    </script>

Then to save the inputted data:

<?php
$sfiles[1] = "gen_signature_third_line_feature.txt";                $sinput_name[1] = "gen_signature_third_line_feature";

    for ($si = 0; $si <= 1; $si++)
    {
        if ($_POST[$sinput_name[$si]] == "yes")
        {
            $data = $_POST[$sinput_name[$si]];
            $file = fopen ($directory.$sfiles[$si], "w");
            fwrite ($file, $data);
            fclose($file);
        }
        else
        {
            $data = "no";
            $file = fopen ($directory.$sfiles[$si], "w");
            fwrite ($file, $data);
            fclose($file);
        }
    }
?>

& finally, to retrieve the data:

<p class="RE">RE:</p>
<p class="subject">
    <?php include($serverdir."edited_gen_re_line1.txt"); ?><br/>
    <?php include($serverdir."edited_gen_re_line2.txt"); ?><br/>
    <?php include($serverdir."edited_gen_re_line3.txt"); ?><br/>
</p>

<br/>

<?php include($serverdir."edited_gen_body.txt"); ?><br/>
JameB 66 Junior Poster

I did that, but it's still displaying older version....
.
.
.

I'm not sure if it's the cache that's the problem or my code... :S

What I'm doing is the following:

I have a form.php file that takes in user input (checkboxes and text input).

Whenever the page is being "unloaded" (javascript), the page will submit the form by sending the info to process_script.php. That script will write the info in text files.

After writting, it will redirect the user to the final.php which will pull the info from the text files and display the page. (include() function of PHP)

.
.
.
.

Does any of that seem to be the problem?

JameB 66 Junior Poster

I don't see how it's difficult for you to make you site IE compatible.

Although I don't have a degree in computer science, or a job in the field, I know programming and web development. I've developed a couple of sites for offline and online uses. Making them compatible on ALL of the browsers was never an issue for me.

To be honest, you're shooting yourself in the foot by doing things like these...

JameB 66 Junior Poster

You have it randomly written down in your code where it doesn't make sense... delete it and you should be fine.

Open the file, search for ".banner" and delete the relevant text...

JameB 66 Junior Poster
<!DOCTYPE html>
<html>
<body>

<select style="line-height:38px; padding: 20px; color: red; height: 20px; font-size: 30px; ">
  <option>Volvo</option>
  <option>Saab</option>
  <option>Mercedes</option>
  <option>Audi</option>
</select>
</body>
</html>

Run that code on http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_option and compare to what you're doing wrong...

JameB 66 Junior Poster
JameB 66 Junior Poster

It's WAMP system. http://www.usbwebserver.net/en/index.php

I also don't have a .htaccess file that I can edit (at least not that I can see)! The USB server has a total of three .htaccess files & they're all for PHPmyadmin...

JameB 66 Junior Poster

Did you inspect the header to make sure you implemented the code properly. There are quite a bit of online sites that let you see the results of the header. Check that, just to rule it out as an issue.

Hmm, the problem is I'm not running this on a publicly accessible server. It will be run locally with a USB web server.

JameB 66 Junior Poster

To make it compatible in the major browsers, one of the tricks used is to "reset" the website and then giving styles to EVERYTHING again!

http://perishablepress.com/press/2007/10/23/a-killer-collection-of-global-css-reset-styles/ is a good source to get yourself a reset code...

One thing you should be careful is if you use this, you'll have to format everything yourself! Even <h1>, <h2> tags will be reset and look no different than <p> tag text!

Also, while you're making changes, open all the browsers you want your site to look good in. Check if the changes you made makes it look bad in one and what not.

JameB 66 Junior Poster

I'm making a website where users select one of the four options - A, B, C, or D (for simplicity) and press a button to be redirected to a different page (page 2) that uses the selection to display one of the four images at the top.

The selection is stored in a text file using PHP.

Page 2 will read the text file and display the picture based on the value read.

The problem is if the user had previously chosen option A and then presses the back button and chooses option C, the first time Page 2 loads, it will still display the picture for option A. Only after refreshing the page once it will load the correct picture for option C.

I tried to prevent IE from caching the page.. but it was no use.

    <meta http-equiv="CACHE-CONTROL" content="NO-CACHE" />
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <META HTTP-EQUIV="Expires" CONTENT="-1">

Note: The website only has to work in IE so no need to make it compatible with other browsers...

Anyone know what am I doing wrong here? Or how to prevent the browser from remembering the previous information?

JameB 66 Junior Poster

What's wrong with the code you have there? It works!

If you want them to be equal despite the capital & lower case letters; you'll have to do some manipulation of the data before you compare them.

string strtolower ( string $variable )

The above statement will convert a given variable to all lower cases; now you can do the comparison without having to worry about the upper/lower cases.

I have a comparison of 2 variables in a script, and am not getting the desired results, and wondered what the simplest comparison would be to obtain those results...

JameB 66 Junior Poster

Yeah I can access that website & use a USB webserver; but the thing is, I'm making this app for people who barely know how to use Excel. So I have to make it as dumb as possible! That's why I am looking for ways to replace code like

    <?php include($datadir."generic_name.txt"); ?>"/>

with something that people can just run as "offline website"

JameB 66 Junior Poster

haha, access denied :(

JameB 66 Junior Poster

Yeah, I have a USB web server but I'm not sure if the IT guys can somehow block that... I also don't want to ask them! Because, then they'll know the one way the system is "failing"

Also, are there any security risks if you run a web server off a USB drive?? I'm on the company desktop, which is connected to the internet AND the intranet...

JameB 66 Junior Poster
JameB 66 Junior Poster

Hi,

I'm a beginner programmer and I'm developing this web app, nothing major; the hardest part was writting to text file (not really hard...)

Anyways, my company policy doesn't allow us to install server softwares on computers. So now, I can't run the PHP code I wrote!!

I am wondering if there is anyway I can run PHP without installing or running any sort of server software.. Like I said, I'm using only the file read/write functions and the include() function. Everything else is XHTML

If there is no way the above can be done; what language can I use to read/write files without needing some sort of server?

Thanks, just point me in the right direction, I'll figure out the rest!

JameB 66 Junior Poster

Sometimes when the visitor clicks a button, nothing happens. I can't seem to figure out what the problem is. Working Navigation Bar

<ul id="navigation">
			<li style="border-left-width:0px;"><a href="http://www.team188.com/web/">Main</a></li>
			<li><a href="http://www.team188.com/web/">Ask 188</a></li>
			<li><a href="http://www.team188.com/web/">Season</a></li>
			<li><a href="http://www.team188.com/web">Resources</a></li>
			<li><a href="http://www.team188.com/web/">Robots</a></li>
			<li><a href="http://www.team188.com/web/">Gallery</a></li>
			<li><a href="http://www.team188.com/web/">History</a></li>
			<li><a href="http://www.team188.com/web/">FLL - Vex</a></li>
			<li><a href="http://www.team188.com/web/">Sponsors</a></li>
			<li><a href="http://www.team188.com/web/">Mentors</a></li>
			<li><a href="http://www.team188.com/web/">Contact</a></li>
		</ul>

And the css with it is:

#navigation {
margin: 0;
margin-top:-47px;
margin-left:auto;
margin-right:auto;
padding: 0;
width: 795px;
height: 37px;
border-style: solid;
border-color:#AB0B0B;
border-width:2px;
border-bottom-width:0px;
border-left-width:1px;
border-right-width:1px;
background: #FDE5D8;
line-height:200%;
list-style: none;
}

#navigation li {
text-align:center;
vertical-align:middle;
width: 71px;
height:37px;
float: left;
border-left-width:1px;
border-left-color:#FFCCCC;
border-left-style:solid;
}

#navigation li a {
display: block;
vertical-align:middle;
color:#AB0B0B;
font-weight:500;
text-decoration:none;
width: 71px;
height:37px;
}

#navigation li a:hover {
text-decoration:underline;
font-weight:500;
color:#AB0B0B;
vertical-align:middle;
width: 71px;
height:37px;
}

#navigation li a:active {
text-decoration:line-through;
font-weight:400;
color:#AB0B0B;
vertical-align:middle;
line-height:150%;
width: 71px;
height:37px;
}

Any clues? Is the problem because of the fact that the line-height is changing?

JameB 66 Junior Poster

Hmm, a day ago you didn't know that you have to declare a variable before using them. And now that!? Wow, you must be a really fast learner or a really fast at Ctrl + C & Ctrl + V. Very Interesting.

JameB 66 Junior Poster

I want to make sure that people with JavaScript disabled get to see the content they'll be missing out on.

USING JavaScript to change the 'display' to 'none' would do the trick right? Because they have it disabled, it won't become 'display: none;' and therefore will be displayed? Yes?

JameB 66 Junior Poster

Try this:

#footer
{
  color: #fff;
  width: 1020px;
  height: ____px;
  margin-left: auto;
  margin-right: auto;
  background-image: url(images/ourbg2.png);
  background-repeat: repeat;
}

And when all fails, try to fix all the errors you'll see when you put your CSS here: http://jigsaw.w3.org/css-validator/#validate_by_uri+with_options

Good luck!

JameB 66 Junior Poster

Ok So the problem is in the firing of the onload(). Any ideas why that'd take long to kick start? Thats the reason why it shows my 11KB php file taking 5 seconds to download on DSL connection.

Still no clue on the solution.

JameB 66 Junior Poster

Alright, that worked! :)

Is jquery the same as javascript? If someone has disabled javascript, will they still be able to see my website's toggling content?

JameB 66 Junior Poster

I'd advise against posting the entire code. People will just search Google, find this post and be lazy and just copy it!

I know I would. :P

JameB 66 Junior Poster

I have a javascript function to toggle a specific id sent to the function

<script type="text/javascript">
function toggle(id) {
	var localId  = document.getElementById(id)
	if (localId.style.display == 'none') { localId.style.display = 'block' }
	else { localId.style.display = 'none' }
}
</script>

I want to do the same in jQuery, I found some tutorials and I got one to work but I don't understand jQuery syntax at all and I am kinda confused.

$(document).ready(function(){

	//Hide (Collapse) the toggle containers on load
	$(".toggle_container").hide(); 

	//Switch the "Open" and "Close" state per click then slide up/down (depending on open/close state)
	$("h2.trigger").click(function(){
		$(this).toggleClass("active").next().slideToggle("slow");
	});

});

I got that to work with the next element but not with a specific id. I need it to be a specific id because I have almost 5 toggles per page and I find it easier to manage to ask the script to toggle by a specific id...

Just so that its clear, this is how I am using the javascript function:

<a href='javascript: toggle("rules_t")'>
<img src="lalala.png" id="rules" class="hoverOpacity" padding="5px"/>
</a>
<p id="text">A link to this season's official rules and related links.</p>

<div id="rules_t" style='display: none'> <?php include("gaga.php"); ?> </div>

Can someone help me convert that javascript into that smooth toggling jquery?

JameB 66 Junior Poster

PLease take pity on a poor noobie... I got the errors down to 23, but the page still won't display in ie7, all of the errors are due to the youtube videos and sliced images..

Thanks

Just wondering how did you make that page? Did you use any "drag and drop" softwares? If so, please dont.

Actually make an attempt to design your website and you'll learn A LOT from it.

Also, if nothing works, strip down the code to no content and see if that renders in all browsers. That way you'll know where to problem is.

JameB 66 Junior Poster

On my computer it seems to take longer to load on the page loads where it shows the front view of the Blizzard-XI (the one with it pushing the soccer ball) than when it's showing the side/back perspective.

Hope that helps in some way :)

Hmm, I should take out the image randomizer. Its not doing much anyways. Wow, I really don't get this problem! It makes me laugh...

JameB 66 Junior Poster

On a side note... one thing to be aware of is that a very large number of cross-compatibility issues between MSIE and other browsers is generated by the CSS file and the settings therein. Thankfully you provided us with the contents of the CSS file you were.... oh wait, no, you didn't :twisted:

Actually he did. He posted the link to his website and well you should know how to find the css file from there!

JameB 66 Junior Poster

You make a file called reset.css where you have your existing stylesheet and import that stylesheet before you import your actual stylesheet.

Many browsers apply some "default" styles to the elements. When IE, Chrome, and FF apply differently, it shows difference. By resetting CSS you are creating an ideal environment to render the page.

Good Luck!

<style type="text/css" media="all"> @import url(/reset.css); @import url(/style.css); </style>
JameB 66 Junior Poster

http://validator.w3.org/check?uri=http://lostangelsproject.com/&charset=(detect+automatically)&doctype=Inline&group=0

On Line 409:

<div id="background"><img src="http://lostangelsproject.com/wp-content/uploads/2010/07/JodieComp_1152x864.jpg" alt="field" style="width: 100%; height: 100%; background-repeat: no-repeat"/></div>

What is no-repeat by itself? It makes no sense!

JameB 66 Junior Poster

PLEASE don't post 600 line of code again! Thank You!

Also, you need to learn some HTML.

http://validator.w3.org/check?uri=http://popnwedlock.com/services.html&charset=(detect+automatically)&doctype=Inline&group=0

Remember that if you don't have proper syntax, you will never get cross browser compatibility.

Good luck fixing those 124 errors and 3 warnings! :)

EDIT:

Line 240, Column 114: entity was defined here
…="http://www.youtube.com/v/xci3AFHRbco&hl=

that error can be easily fixed by replacing the & with &amp; &amp; is the samething as & but it is generally a good idea to use &amp; instead of simple &.

JameB 66 Junior Poster

I am having a random problem with my website. I am not sure if its just my internet connection that is causing this or if it is a problem with the website it self.

www.team188.com/web

The prob is that randomly once in like every 5-6 visits, the website will take a long time to load. Normal load time is about 850ms. But when this random bug/glitch/problem/something happens, it will take about 5.5 seconds to load the page.

The site contains javascript, PHP randomizer, uses PHP's date() function and logs the visitors' IP address and time.

One by one I took out all of these and even then the bug occurs.

Try refreshing the page if it loads fine the first time and keep doing so and withing 10 refreshes you'll see what I'm talking about. (that is if the problem is not my internet)


Also, Google's dev tools tells me that everytime that 5.5 sec glitch occurs, my index page:

Send Request: GET
Total Heap Size: 11MB

Any idea what that means?

JameB 66 Junior Poster

Oh, I see. Thanks.

JameB 66 Junior Poster
<?php
  echo "<img src=\"$path\" title=\"$title\" alt=\"$alt\" />"; 
?>

No, thats not what I meant, I could have just written the <img/> simply if I wanted to do that.. what I am doing is changing the source of the image after page loads to reduce the time it takes for the text to show up.

So I have a <img/> tag where the source is a random picture file. Then the page loads, text shows up for the user to read. NOW, its time for all the random pictures to show up. So I use that javascript...

This is the same as me putting an image on the page.

JameB 66 Junior Poster

Your post is very unclear
you cant change the source of an image after page load in php
the image will only be different each page load, will not cycle through images while the page is open
What do you want to accomplish

Hey! Remember what you suggested in the other thread? After a page loads change the source of the image?

I want to do the exact same thing but in PHP and not javascript. Simply put, I need to do this

<script type='text/javascript'>
function load_images()
{
  document.getElementById('IMG001').setAttribute('src','the_path_to_the_actual_image.png' );
}
</script>

in PHP.

JameB 66 Junior Poster

I've implemented changing src of an image using javascript but I don't want any javascript in my website now. So I need help to do that in PHP! :)

What am I doing:

In the main index.php file,

<body onload="load_images();">

Then I include a random file

include("content_to_display.php");

At the end of content_to_display.php,

<script type='text/javascript'>
function load_images()
{
  document.getElementById('pic').setAttribute('src','/resources/resource/features/old_old_website/preview.png' );
}
</script>

and each image has an id

<img src="blank.jpg" id="pic"/>

How can I complete change that javascript into a PHP code?

Please help! I tried searching on google without much help.

JameB 66 Junior Poster

My Opinion:

Instead of creating websites in html, you can do that flash lite. because in their documentation itself they given what are the supports and unsupported technologies within the mobile. So you should test with an simulator to know the merits and demerits. We can also develop in J2ME.

For yours is not working because you are fetching the image from the external folder or something which should also within your mobile. May be something not enabled in your browser of your mobile. check for Javscript enable/disable options.

I would love to make a flash website but not all popular smartphones have flash capabilities. Like the iPhone and the Blackberry(for now, i hear rumours that the new OS has flash)

I am just having trouble getting my existing files to display correctly on the small mobile screen.

JameB 66 Junior Poster

Another Microsoft mobile fail:

http://www.pcworld.com/article/200258/why_microsofts_kin_phones_were_destined_to_fail.html?tk=hp_blg

According to your logic, all companies should stop making OS other than Microsoft. All TV manufacturers should just give up other than SONY and Samsung. All phone companies other than Apple and Google (very much new to this market) and so on?

Although apple's iphone is great, I know A LOT of people who dislike it(they own it) because the touch screen is terrible in their opinion. So what will these people do if newbies like microsoft just give up? What if there was no blackberry?

And don't call anyone a troll simply because they don't agree with your OPINION.

JameB 66 Junior Poster

I'm just starting to make my existing website's mobile version. I was wondering what kind of doctype should I use to ensure maximum number of phones rendering the site the way it was intended to. Targeted users use smartphones and not the thousand year old nokia phones.

Also, Should I just set the body's width to 100% of the phone's screen or should I do like a 250px wide website?

I tried to view my existing website on Blackberry Pearl with javascript enabled but it doesn't load images. (it doesn't load images because i am using javascript to change the src of img from a blank transparent image to the actual image.) Anyone know why its not working?

Any other tips, warning are welcome! :)

P.S. If anyone is not clear about the blackberry problem, and wants to look @ how i'm changing the src, click my username and find a thread called "criticize this website" and look @ the last post..

JameB 66 Junior Poster

You can put use the <button></button> tag around an image.

<BUTTON TYPE=SUBMIT>
     <IMG SRC="/this/leads/to/your/button/image/!!" HEIGHT="97" WIDTH="105" ALT="Starflower" ALIGN="ABSMIDDLE"><STRONG>Keep this blank or not...</STRONG></BUTTON>

Difference Between the <input> Tag and <button> Tag:
At first glance, it may appear that there's not much difference between using the <button> tag and <input> tag. But there are some differences.

The main difference is that the <button> tag allows you to place HTML code in between the opening and closing tags. The <input> tag is an empty tag (i.e. it doesn't have a closing tag), so you can't add content to the tag.

Another key difference between the two tags is with the value attribute. The <input> tag uses this attribute to display a label on the button (e.g. "Click me!"). With the <button> tag, on the other hand, the value attribute is submitted along with any form contents and can be used for processing.


http://www.quackit.com/html/codes/html_button.cfm

JameB 66 Junior Poster

For my website, I have set up a very basic and nooby email service. It will take the message and write it to a text file.

However, I want to set up the email so that it will send the message as an email to [email]___@___.com[/email].

How do I do that? Also, I am not looking for 'mailto' function..

From what I was told, it will open up a local email app like Outlook or Windows Live Mail and A LOT of people do not have that set up.

EDIT::
My website is running on IIS and has PHP 4.X something...

JameB 66 Junior Poster

Try This:

function getipaddress()
{
	if (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
	{
		$ip = $_SERVER['HTTP_CLIENT_IP'];
	}
	else if (!empty($_SERVER['HTTP_CLIENT_IP']))
	{
		$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
	}
	else if (!empty($_SERVER['REMOTE_ADDR']))
	{
		$ip = $_SERVER['REMOTE_ADDR'];
	}
	else
	{
		die("If you are receiving this message, please contact the webmaster at ______________");
	}
	return $ip;
}

This code works just fine for my website. Although I don't have much use for it. I wanted to block specific IP address back when I started web programming. Then I realized that the IP addresses are not static.

I only remember one or two times this code failed to get the IP.

Good luck!

JameB 66 Junior Poster

This can easily be fixed by setting the width and height to that of the picture.

JameB 66 Junior Poster

I just made a program that takes input from the parallel port(or printer port) of a computer and translates that input to English/Numbers. Its a Morse Code Transmitter translator and a Morse Code Calculator.

Anyways, so I have to write a writeup about the program and I am kinda confused as to what kind of program is it? I basically have an infinite while loop and hundreds of IF statements inside. So what kind of program is that?

I am not sure if that made any sense...

JameB 66 Junior Poster

Hey everyone,

So I am doing this computer engineering class project where we have to use a parallel port of a computer to read inputs and make a program that acts according to that input.

The project is to make a high rise building(or a mini city in my case) that has sensors (to detect opening of doors or windows). For me, this is somewhat difficult because I have like 21 sensors that require 21 inputs on the parallel port. But, I can only use four of the five available.

I decided to "send" a 4 bit signal to the four pins on the parallel port every time something unwanted happens. So it would send like 1100 or 1101 or 0100 or 0010 etc and the parallel port would come up with some random number that corresponds to this signal and the program will act accordingly.

PROBLEM!!


When I thought of this, I though like to "SEND" the signal to the parallel port. But, the city that we made has all the sensors that "STOPS" sending the signal to the parallel port. Basically, if everything is fine, the circuit is complete and the inputs are received.


And if someone breaks into a building by opening a retractable roof door, the circuit breaks and the parallel port should receive a unique signal.

So should I wire this in a series circuit so that the first input pin on the parallel …

JameB 66 Junior Poster

Thank you.

Is there an IDE that you would recommend a noob that doesn't need me to put in the cin.get (); code?

Microsoft Visual C++ Express Edition (Free) or you can pay for it. But, since you are new, you are no where close to needing to pay for the extra features.....

JameB 66 Junior Poster

I spend 6 to 7 hours each day practicing c++ and visual c++ but end of the day I think I don't have any Test or homework. Please anyone can provide with some site helping with the same. Thanks in advance
JIten

There is a list of problems in this thread (its a sticky, read it). Other than that,

www.wcipeg.com/judge
http://cemc.math.uwaterloo.ca/contests/past_contests.html#ccc

JameB 66 Junior Poster

You need to join the modes with bitwise OR ( | ), not as comma separated parameters.

myfile.open( "myfile.txt", ios::app | ios::in | ios::out );

Opening with append mode will not allow you to overwrite the file content, all you can do is add to the end. If you really want to overwrite, you need to use the At End mode ( ios::ate ). After reading the data, you will need to seek back to the beginning before writing.

Thanks that got me on the right track! But, the ate doesn't work. I can't overwrite it. When I use ate, no output is sent to the file. I don't know why...

@ Salem : Thanks, for the info. It didn't work anyways. :(

JameB 66 Junior Poster

HI, I was trying to learn more about I/O with files in C++ and I can't figure out why this program can't output to the file...

#include<iostream>
#include<string>
#include<fstream>
#include<algorithm>
using namespace std;

char userinp;


void print_interface()
{
	cout << "Enter E to Encrypt" << endl << "Enter D to Decrypt" << endl;
	cout << "Enter R to Erase the file" << endl << "Enter X to Exit" << endl;
}

int main()
{
	int cipher = 0, i = 0, iter = 0;
	string data[1000];
	fstream myfile;

	myfile.open("myfile.txt"); // For some reasons this gives me error : myfile.open("myfile.txt", ios::app, ios::in, ios::out);
	if(! myfile.is_open())      // It was something about overloaded function can't take 4 arguments...
	{
		cout << "Could not open the file." << endl;
	}

	do
	{
		print_interface();

		cin >> userinp;

		if (userinp == 'E' || userinp == 'e')
		{
			system("cls");

			cout << "Enter the cipher to user (Number)" << endl;
			cin >> cipher;

			while(! myfile.eof())
			{
				getline(myfile, data[iter]);

				cout << data[iter];

				for(i = 0; i < data[iter].length(); i++)
				{
					data[iter][i] += cipher;
				}

				cout << data[iter];

				iter++;
			}

			for(i = 0; i < iter; i++)
			{
				cout << data[i] << endl;
				myfile << data[i] << endl;
			}
		}
		else if (userinp == 'D' || userinp == 'd')
		{
		}
		else if (userinp == 'R' || userinp == 'r')
		{
		}
		else if (userinp == 'X' || userinp == 'x')
		{
			break;
		}
	} while(1);

	myfile.close();
	
	return 0;
}

What I want this program to do is take …