In logout.php maybe try to useunset($_SESSION['username']);
<?php
unset($_SESSION['username']);
session_destroy();
header("location:index.php");
?>
In logout.php maybe try to useunset($_SESSION['username']);
<?php
unset($_SESSION['username']);
session_destroy();
header("location:index.php");
?>
Hi Wikit. If you have found a solution please mark this thread as solved.
Make sure you uploaded your files to your public folder.
This prints for me. Yes you can store the value(s) of config[] in a database.
<?php $config['slogan'] = "My Website Slogan"; ?>
<div class="row-2">
<div class="titles">
<?=$config['slogan']?>
</div>
</div>
The current url is not being declared nor do you have a redirection as I said in the code you have posted.
This is the way I do MVC in instances like this. I post the form to self (eg: the curent URL) validate the form on the fly and check for credentials if all is well redirect to the auth pages.
In other words above the line :
$this->setAction("/auth/index");
you need to get the current url and pass it to the setAction()
I started to wonder the same. You can't have an input text with a clickable link in it. If you want this array to be passed to the input field you can use what veedeoo said which is easier than trying to parse a string like that.
<?php
$data2 = array('c'=>'google.com');
?>
<INPUT name="c" value="<?php echo 'http://',$data2['c']?>">
Try this:
<INPUT name=c value="<?php echo 'href=http://',$data2['c'],' " ',$data2['c'] ?>">
ALMOSTBOB - you are right as well however I need to get my html to work as or with a PHP file or some flavor of that (not sure that is where I have my disconnect) then I am sure your REMOVE_ADDRESS code above will work.
This is a server configuration issue so, do it with .htaccess Put a file named .htaccess << (notice the period in front ) in the htdocs of your server (eg: public html) or where your source folder is. Input either rule below that you need or prefer.
This will change all .html files on your server so that they can execute php
AddType application/x-httpd-php .html
or if you just want php on your registration page :
<Files index-eng-register2.html>
AddType application/x-httpd-php .html
</Files>
You will need to pass the variables to the int(speed) of your Timer animation in the ActionListener of your Timer class. Your timer class will also need to implement KeyListener.
The Timer class has a setDelay method. setDelay() will not affect setInitialDelay(). So if you want your monster to begin moving at startup or when the event is fired you will set this up in your setInitialDelay() After the event is fired then you can use setDelay to control the monsters speed(Delay between the firing of your events such as keyPressed in your example)
@arunmagar, you are correct to sanitize the data, but be aware that mysql_real_escape_string will be deprecated as of PHP 5.5.0 release and removed in later versions.
Your query is failing here:
$strSQL = "SELECT * FROM employee WHERE proj_mgr = '$session->username'";
Try this:
$strSQL = "SELECT * FROM employee WHERE proj_mgr = $session->username";
If it doesn't work then you will need to be sure that the $session->username variable is not empty.
This error sounds like your server is not running. If your running Apache go to your
Apache installation folder >> bin/ApacheMonitor.exe
With ApacheMonitor.exe you can start your server.
Hey, thanks a lot for the help..
No i didnt think anything..
I will do some changes..and let u know..
I will send the code to you, can u check and correct it for me..Thanks for ur help again
I will be glad to help you out any way I can. Send me a pm when your ready to proceed and I will help you.
Usually when I start a project, especially large scale , I sit down with a piece of paper and list out all my methods,classes, and variables in each one and then state what purpose they will serve within the program.
Some call it 'Pseudocode', I call it 'jotting' ;)
It all begins in your mind and on paper. This is where dreams become the reality.
In line 17 i already have the
echo "$m_id" ;
It doesnt print any thing
Sorry I missed that particular line. I would say this is where your query is failing. If it is not echoing any data here, hence the variable does not exist, so it cannot be passed into the query.
Also, I am noticing now that you have $companyname listed consecutively within your insert values statement.
I would recommend changing these, it can get confusing, not to mention cause buggy errors that will be hard to find.
I would also recommend executing var_dump(); to see what exactly is being passed.
Please don't take this wrong I am trying to be helpful, not hateful.
Where id is the company id, from the company table..
What is the echo statement at line 15
echo "$max_id" ;
Change this to
echo "$m_id" ;
because this is the data that is actually being inserted. Let's see what this prints?
Also uncomment line 26, unless your sure which query is failing. I would also change the echo errors to something else to differentiate them.
Hey
Thanks,
For ur reply..
That was the same idea i was thinking...when i worked it out it gives me a Duplicate error...
What is the duplicate error? Are you auto incrementing as previously stated?
Echo your error to screen with :
echo mysql_error ();
Hello, i'am newbie. I don't know about programming language,in each language, i only know "hello world".
Javascript is spend more expensive bandhwidth. Especially for Limited Account of hosting.
Is it possible to convert javascript to php or html ???
Ther are online tools, such as, yellowpipe.com that convert HTML to a few other scripting languages, but to my knowledge you cannot convert javascript to PHP without rewriting the source code.
By the way JavaScript is not bandwidth extensive or costly 'to you' because it does not communicate with your server. It is client side only.
Hi,
The dynamically created rows are appended at the end of the table i.e. after the last row of the table (found by table.rows.length)
and those individual <tr> contains 8 more <td>s carrying some texts and their respective text fields.
Now we have one such default <tr> , which also contains button for adding more row , onclick of which the addRow() function is called to create the dynamic row each time.
The code is created dynamically that's fine so far.
But when the form is submitted the default textfield's (from the default<tr>) values are found in the echo of post data but not other .
The same script works fine in IE and shows all the elements textfield's values in the textfield POST data along with the default one, after form submit echo.
And this post means what? Sorry, but it seems pretty much meaningless, even after reading it 3 times.
No Code = No Help
Ok your source says that your JavaScript file is 2 directories up.
<script type="text/javascript" src="../../mainapp/scripts/xxx.js"></script>
Try changing this to 1 directory like :
<script type="text/javascript" src="../mainapp/scripts/xxx.js"></script>
and see if that works.
Right click on the loaded page and view source, copy and paste the header info down to the body tag here. Then tell me what is the full path to your template files if your using a template system.
When pasting please use the code tags
Hi, I m new in this field. Actually I face a problem, I call a php file from a html file using javascript. I declare a variable in php file,I want to use this variable in the same html file after execution of php file.Please help.
Add .htaccess file to your directory
Inside the .htaccess file input :
AddType application/x-httpd-php .html .htm
AddHandler application/x-httpd-php .html .php .htm
This should allow you to use php in your .html files
Could you not put the link in the array like:
<?php
if(!empty($a1[image]))
{
$im_array = explode("|", $a1[image]);
$FirstImage = "<a href=\"link_to_your_image\" target=\"_blank\"><img src=\"re_images/$im_array[0]\" width=100 height=100 border=1></a>";
$SecondImage = "<a href=\"link_to_your_image\" target=\"_blank\"><img src=\"re_images/$im_array[1]\" width=100 height=100 border=1></a>";
$ThirdImage = "<a href=\"link_to_your_image\" target=\"_blank\"><img src=\"re_images/$im_array[2]\" width=100 height=100 border=1></a>";
$FourthImage = "<a href=\"link_to_your_image\" target=\"_blank\"><img src=\"re_images/$im_array[3]\" width=100 height=100 border=1></a>";
$FifthImage = "<a href=\"link_to_your_image\" target=\"_blank\"><img src=\"re_images/$im_array[4]\" width=100 height=100 border=1></a>";
$SixthImage = "<a href=\"link_to_your_image\" target=\"_blank\"><img src=\"re_images/$im_array[5]\" width=100 height=100 border=1></a>";
}
$ShowInfo .= "</td>\n\t<td align=center valign=top>$FirstImage<br>$SecondImage<br>$ThirdImage<br>$FourthImage<br>$FifthImage<br>$SixthImage<br>For more information call<br><b> $a1[FirstName] $a1[LastName]<br>$a1[phone]</b><br>or click <a class=RedLink href=\"email.php?AgentID=$a1[AgentID]&ListingID=$a1[ListingID]\">here</a> to email.<center>";
$ShowInfo .= "</center></td>\n</tr>";
?>
or am I misunderstanding the question?
Hi Saaski,
I am not familiar with your system, but you can try this. It might work.
When you re-boot hit F8.
Choose the Safe Mode with Command Prompt Option.
After you log in you should see the command prompt window.
In this window type: C:\Windows\system32\Restore
When you reach this directory type: rstrui.exe
This should bring up System Restore for you.
Good Luck! ;)