SofiaComp
Members-
Content Count
24 -
Joined
-
Last visited
About SofiaComp
-
Rank
Newbie [Level 1]
-
if you start learning HTML, you will learn XHTML, CSS, and javascript along with it. If you start learning PHP you will learn wait... i don't know what more, maybe only php. Anyway you need php if you want to make scripts like webpage counter, login or logout users, use databases...etc. Without html you cannot learn php , (not that they have something in common).
-
Yes, that's the thing try using php's integrated function header(); check that function in php.net, check the mime types that you need, integrate it in your webpage.
-
but wait that way you can uninstall programs too
-
hmm, i don't know what course you're into but here the most famous way of developing java apps is by using "eclipse" it is a java development platform like visual c/c++ and has many useful features, like build in compiler so you don't have to write code from the command line every time you want to compile your code it is as simple as a mouse click. Try googling it and come say do you like it.
-
How To Pro-long Your Laptop Battery Life tips and tricks
SofiaComp replied to SofiaComp's topic in Hardware Workshop
hehe, Can you measure the working temperature? i think it is above 30C when you play a game like CS? Ah And when you play games you can remove the battery and place it in a 5C conditions. My laptop is not suited for games. however i am not sure for the temperatures but i guess the best temp when the battery will discharge the less is around 0C. But be sure to do that on your own risk. -
Hi there, I have a new laptop and i want to prolong my li-on battery life. I use the laptop as a Desktop computer more offten rather than mobile computer. I've decided to remove my battery which is a li-on battery. Here is how the removing works: Charge your battery on 100%, then discharge (to discharge it you must run your laptop on battery power) to about 45%-50%. Then remove the battery, after removing the battery is good to place something(paper,cotton...etc) in the placeholder of the battery on the downside of the laptop so that it remains clean. Put the laptop on A.C. power, or D.C. power whatever your charger is . The battery must be in a cool place 10C or something teoritically it can survive -10C but i've never headred of someone doing that. So you can place it in the refrigerator, as it is cool enough to slow the depletion process and increse you battery lifetime. li-on batteries react with heat. When heat is present about 30C your battery lifetime will be reduced with about 40%-50%, the more heat the less battery life. WARNING: Never remove a fully discarched battery from latop for a period over well about 1 month, because your battery will not be able to be charged again. Never leave a battery in a freezer. because i don't know what the result will be the li-on batteries are said to survive -40C but i never tried it. I hope the above posted is useful.
-
i think you can make auto start after 2 or 3 seconds the website loaded , in fact one second is the best, or 0 seconds...no matter, your choice. Oh i think this is a common problem check if you don't have some other software installed that blocks your flash program from executing, check for latest version, you can make uninstall - install again, if that doesn't work try using flashobject. Please come back and tell what happened.
-
Logout link without a using a database Multiple Admin Login (php)
SofiaComp replied to iGuest's topic in Programming
I think it is possible like here is the login_logout.php //make a variable to store user defaults, since it is admin i think one password will be enough $password="yourpasswordhere"; // or if you have more passwords $password=array("jim"=>"pass","etc"=>"etc"); //now to assign a var to user name $admin="adminPassword"; //admin login name here you can get it via form with the $_POST['adminLoginName'] variable or you just can leave it here. if($admin===$password['jim']){ setcookie("admin",$admin,time()+3600); } echo <a href="login_logout.php?value=logout" /> if($_GET["value"]==="logout") { setcookie("admin",$admin,time()-3600); //redirect or whatsoever } I hope you get what i was trying to say here, use $_GET global variable to logout the user. -
I agree. Probably there is no need to write a script for a different machine the way you write one for your own. The user should be familiar with the language, and escape any well known errors, like syntactical errors or missing variable. There is no need for useless posts like "Hey i cut - paste your script and it didn't work, I'll never use your scipts again!".
-
Hi there To make a post board first we have to design and implement the database in this case we use mysql. 1. I decided to have 1 database called post board so enter in your favourite mysql tool and create one database: create database your_database;then i'll use 2 mysql tables : One for topics or "headings" if you like and on for the actual posts. create table headings(id int not null primary key auto_increment, heading varchar(100) not null, author varchar(30) not null, date datetime not null);The second table - posts will have relation key transfering data from table headings to table posts: create table posts(id int not null primary key auto_increment, post varchar(2000) not null, author varch(30) not null, date datetime not null,headings int not null, foreign key(headings) references headings.id);[\code]Now we start with the php part.first we need to create a connection to mysql, OOP has a good painless way of doing this[code]//Your_filename, Save it as YourClassName.class.phpclass YourClassName{<?phpfunction connect(){ $user="yourMYSQLusername"; $password="yourMYSQLpassword"; $host="yourWebServiceHost"//Usually localhost mysql_connect($host,$username,$password); }}?> //filename_utils<?php//Your_filename1 Save it as YourClass1Name_Main.class.phpclass YourClass1Name_Main public $heading; public $author; public $post; function New_Topic(){ $query="Insert into headings (heading,author,date) values('$this->heading','$this->author',now());"; mysql_query($query)or die(mysql_error()); $query="Insert into post(post,author,date,heading)values('$this->post','$this->author',now(),LAST_INSERT_ID());"; mysq_query($query)or die(mysql_error()); } function show_headings(){ $query="Select * from headings;"; $result=mysql_query($query); while($row=mysql_fetch_assoc($result)){echo "{$row->heading}\n Posted by {$row->author}\n On {$row->date}";?><a href="post_into_topic.php?id=<?php echo $row->id;?>">Join</a><br /><?php } } function set_a_cookie(){ ob_start(); $id=$_GET['id']; setrawcookie("id",$id,time()+3600); ob_get_contents(); ob_clean(); } function post_message(){ $query="Insert into posts(post,author,date,headings)values('$this->post','$this->author',now()),'$_COOKIE['id'];"; mysql_query($query)or die(mysql_error()); } function show_messages(){ $query="Select * from headings,posts where headings.id='$_COOKIE['id']';"; $result=mysql_query($query); while($row=mysql_fetch_assoc($result)){ echo "{$row->heading}\n Author {$row->author}\n Date {$row->date}<br />"; echo "Answer: {$row->post}\n Author{$row->author}\n Date{$row->date}<br />; }}?>Now we need two files //CreateATopic.php<form action="<?=$_SERVER['PHP_SELF'];?>" method="post">Subject <input type="text" name="heading" />Author <input type="text" name="author" />Post <textarea cols="100" rows="100"></textarea><input type="submit" /></form><?php?>//Post_into_topic.php<form action="<?php echo "{$_SERVER['PHP_SELF']}?id={$_COOKIE['id']}";?>" method="post">Author <input type="text" name="author" />Post <textarea cols="100" row="100"></textarea><input type="submit" /></form>Now we have to make one more file Index.php who will be the main page //index.php<?phpinclude_once 'YourClassName'; $db=new DB(); $db->connect(); include_once 'YourClassName_Main'; $ClassName=new YourClassName_Main;$ClassName->show_headings(); ?>We have the main page from there people have a link allowing to post a topic since we don't have a topic we have to post the first //[code]//CreateATopic.php<form action="<?=$_SERVER['PHP_SELF'];?>" method="post">Subject <input type="text" name="heading" />Author <input type="text" name="author" />Post <textarea cols="100" rows="100" name="post"></textarea><input type="submit" /></form><?phpinclude_once 'YourClassName.class.php'; include_once 'YourClassName_Main.class.php'; $db=new YourClassName(); $db->connect(); $ClassName=new YourClassName(); $ClassName->heading=$_POST['heading']; $ClassName->author=$_POST['author']; $ClassName->post=$_POST['post']; $ClassName->New_Topic(); ?><br /><a href="index.php">Go to start</a><br /> //Post into topic .php<form action="<?=$_SERVER['PHP_SELF'];?>" method="post">Author <input type="text" name="author" />Post <textarea cols="100" rows="100" name="post"></textarea><input type="submit" /></form><?phpinclude_once 'YourClassName.class.php'; include_once 'YourClassName_Main.class.php'; $db=new YourClassName(); $db->connect(); $ClassName=new YourClassName(); $ClassName->author=$_POST['autor']; $ClassName->post=$_POST['post']; $ClassName->set_a_cookie();$ClassName->post_message(); $ClassName->show_messages(); ?><br /><a href="index.php">Go to start</a><br /> Well, That was it. If i've maded some part unclear please post a message so i can fix it. I hope you enjoy it.
-
Ssl For My Website. what is this for ecommerce site
SofiaComp replied to enhu's topic in Business Forum
For an e-commerce site SSL is a must, as a client of the oscommerce site my self i want to be sure that the information i submit about my payment is not seenable by third parties over the network, and these days a lot of online stores set SSL over http, simply when a customer comes he feels more secure and you become trustworthy trader for them. I think that every self respecting web hosting company offer SSL package of some kind in their services. I advice you to get one.Oh, and one more funny thing. Make sure you make a backup of your certificate, that is not happening often but if your server crashes you'll lose it. -
i presume you want to add some functionality to your already designed web pages.I've learned XHTML and CSS then learned php than saw ajax and now learning javascript, if you want to make a good web designer you just have to understand javascript. My advice is to read one book on the php topic, then go to php.net and continue the process of learning.
-
wamp is a bit tricky , first you have to start the server, go on wampp icon in the windows tool bar right click and select start wamp server , see if your port 80 is open : on the wamp icon in your tool bar press right bottom of the mouse go to apache and click on test port 80, if port 80 is not available go to wampp/apache , edit httpd.conf find the section which says LISTEN 80 change it to something else from 1 to 10000 or was it more ? anyway you got plenty of choices for ports, restart your wamp server by clicking on the icon in the windows tool bar with right mouse button and select restart wampp server or stop and then start wamp server. go to LOCALHOST. You should see a web page there wich says that apache is running. There after remove index.html or index.php in your htdocs folder, make one file test_php.php place into the file the following text "<?php phpinfo();?> navigate to LOCALHOST click on the file test_php.info if you see a nice screen with all php configurations in it then you got it running. you can read a step by step on the wamp forums->wamp step by step . I personaly prefer xampp as it is more stable and easier to work with. for the xampp installation and configuration visit apache friends