Everything posted by stallman3738
-
problem with moving <script> codes to separate js file
Hi guys I have a few js codes on my .php page and I'm trying to move it to a separate file and then address this file (<script type="text/javascript" src="file.js"). but there is a php code in this js code and .js files don't run php code. because php codes are rendered before js/html is there anyway to move these vairables to js file? thanks
-
is there any problem with designing all the website with pixels?
tnx for reply I use pixels mostly for wrappers and outter DIV and etc. but elements inside them are mostly %;
-
is there any problem with designing all the website with pixels?
Hi guys I was given a PSD format of website layout and they want that their website be exactly like PSD (even the sizes and ...) here is my question, is there any problem with designing all the website and most of the its content specially height with pixels? I mean the website works very well on my monitor (13') but will the website work the same way in other monitors (15' or 17')? will be any page structure destruction? (sorry for poor english) thanks
-
Warning: Cannot modify header information - headers already sent by ...
Hi, I found it, because I didn't save the file in UTF-8, it was in ANSI that is why that error reported. besides that I think it would be a good idea to redirect using .htaccess file to overcome such problems in situations where you can't find the solution. and about md5, yeah I have used this as the only method to encrypt the password; thanks for your suggestion
- different offset for border-radius between IE and other browsers
- different offset for border-radius between IE and other browsers
-
different offset for border-radius between IE and other browsers
Hi guys. I want to round one corner of a DIV, I wrote this code: -moz-border-radius: 5px 0px 5px 5px; -webkit-border-radius: 5px 0px 5px 5px; border-radius: 5px 0px 5px 5px; but I saw different results in IE and chrome,firefox,opera. in IE the normal corner is on top left while in chrome,firefox,opera the normal corner is on top right! for illustration please look the following images. IE : Firefox, Chrome, Opera : thanks
-
Query help
hi explain more, its vague, illustrate your problem with table and show some your relations.
-
Warning: Cannot modify header information - headers already sent by ...
no
-
Warning: Cannot modify header information - headers already sent by ...
Thanks alot it worked, how do I output the header_sent data to see what they are?
-
Warning: Cannot modify header information - headers already sent by ...
There was something much more strange, I tested this <?php header("location:add.php"); ?> and still received the same warning
-
Warning: Cannot modify header information - headers already sent by ...
No I tested this and still does not work;
-
Warning: Cannot modify header information - headers already sent by ...
No, this is systemComponent.php <?php class systemComponent{ var $setting; function getSetting(){ $setting['dbhost']='localhost'; $setting[ ' dbusername' ]='root'; $setting['dbpassword']=''; $setting['dbname']='amlak'; return $setting; } } ?> and this is dbConnector.php, <?php require_once 'systemComponent.php'; class dbConnector extends systemComponent{ var $theQuery; var $link; function dbConnector(){ $setting=systemComponent::getSetting(); $host=$setting['dbhost']; $db=$setting['dbname']; $user=$setting['dbusername']; $pass=$setting['dbpassword']; $this->link=mysql_connect($host,$user,$pass)or die(mysql_error());; mysql_select_db($db) or die(mysql_error()); mysql_set_charset('utf-8'); } function query($query){ $this->theQuery=$query; return mysql_query($query,$this->link) or die(mysql_error()); } function fetchArray($result){ return mysql_fetch_array($result); } function close(){ mysql_close($this->link); } } ?> is there anything wrong?
-
Warning: Cannot modify header information - headers already sent by ...
yes display errors are enabled. If comment out the highlighted line then there will be no header and no redirection to add.php page.
-
Warning: Cannot modify header information - headers already sent by ...
hi guys this is my code, but I receive Cannot modify header information warning on the line which is Bold and Underlined. tnx <?php @session_start(); $class="loginTextbox"; if ($_SESSION['url']!="/amlak/index.php") { header("location:index.php"); exit (); } ?> <?php if (isset($_POST['password'])) { require_once './views/database/systemComponent.php'; require_once './views/database/dbConnector.php'; $dbConnectorObject =new dbConnector(); $sentPassword = $_POST['password']; $select = "SELECT * FROM password"; $result = mysql_query($select)or die(mysql_error()); while($rows=mysql_fetch_array($result)) { $currentFirstPassword = $rows['password1']; $currentSecondPassword = $rows['password2']; } if(md5($sentPassword)==$currentFirstPassword) { $_SESSION['login']=true; header("location:add.php"); exit(); } else{ $class="failedloginTextbox"; } } ?>
-
php, how to recieve data from client application
Tnx alot. I should work on it to see what these things are !
-
php, progress bar for file upload
this website is down ! Upload server currently unavailable The first website you suggested did not move the file! it's progress bar suddenly fill the 100% and nothing else happened.
-
php, progress bar for file upload
it works well but im looking for some thing simpler. is there any other way ?
-
php, progress bar for file upload
hi, I want to create a progress bar for file upload but when I submit the page will be redirected to the destination page. how to upload via php and remain in upload page? maybe ajax is needed. tnx
-
php, how to recieve data from client application
hi, I want to build an application in c++ that automatically send some data from client to a server on Internet. my website that must receive data is in php. how does PHP handle such applications? tnx
- problem with removing cookie
-
problem with removing cookie
I saw something very strange! I change that function to this : public function logoutAction() { header("location:/virtualsociety/registration/com/views/logout.php"); } and this is logout.php page : if(isset($_COOKIE['username'])) { echo $_COOKIE['username']; unset($_COOKIE['username']); setcookie("username"," ",time()-3600*30*12); exit(); } else { echo "No cookie"; exit(); } the output is No cookie but when I visit stage1 page, which is login page and has the following code, it outputs the cookie and redirects to profile !!! session_start(); if(isset($_COOKIE['username'])) { echo $_COOKIE['username']; $dbuser = new \registration\com\models\database(); if($dbuser->autologin()==true) //checks if $_COOKIE['username'] corresponds to any existing user header("location:/virtualsociety/home/viewProfile/".$_COOKIE['username']); } WHEN I CHECK THE BROWSER COOKIE, USERNAME IS STILL IN THERE WHILE PHP IN THIS CODE SAYS THERE IS NO COOKIE print_r($_COOKIE); THIS IS OUTPUT : Array ( [phpSESSID] => v7h79f2ajd4hi60apcu8qu6595 )
-
problem with removing cookie
hi guys, I have a webpage that allows users to login and sign in automatically if they check the "sign me in" check box. I use cookie to store their username and they are automatically redirected to their profile by the username stored in cookie. I want to remove this cookie when they click on logout button. this is my logout function which is triggered when the logout is clicked, but it does not remove cookie. public function logoutAction() { session_start(); unset($_COOKIE['username']); setcookie("username",' ',time()-10); session_destroy(); header("location:/virtualsociety/register/stage1"); } and this function is called through ajax call. what is the problem? I guess because it is called through ajax in background with out involving browser. tnx alot.
-
passing array from php to Javascript(xmlHttp.responseText)
I know ajax, so how is this json_encode?
-
passing array from php to Javascript(xmlHttp.responseText)
hi guys I am trying to send an array in server side call by ajax to javascript, but xmlHttp.responseText does not interpret the array which sent by php. the js output is Array . how do I can send an array from php to js xmlHttp.responseText. tnx