what is the URL before you start this script?
where are you requesting the $email
from?
if you var_dump($email);
is there a valid output?
what is the URL before you start this script?
where are you requesting the $email
from?
if you var_dump($email);
is there a valid output?
Where is your Login/Logout button?
Assign your button a name (ie/ button_1), then use your existing IF statement.
if(isset($_SESSION[user_active_statue] == 1))
{
$button_1 = "Logout";
}
else {
$button_1 = "Login In";
}
WTF, i got a PM today. Please block how ever this bell end is:
Hello
my name is queen
how are you doing ,i hope fine i saw your profile today and became interested in you, it will be my humble pleasure to know you the more, and i kindly want you to send an email to my mail so that i will send you my picture for you to know whom i am . Here is my email address [jobe.queen@yahoo.com] I believe we can move from here if it will be your pleasure thanks and God bless,have the best of the day. am waiting for your reply in my mailbox please don't send it in the site
[Remember the distance or color does not matter but love matters allot in life]
[jobe.queen@yahoo.com]
You could select all User email address and create an array.
Then use the array in the BCC field (that way no one gets other peoples email address')
id Studentid Department Subject Semester Marks Min Max Total Percentage
1 111819 MBA History Fourth 200 100 200 200 94.93
2 111820 MCA c third 100 40 60 80 67.9
So, to make sure i undestand.
If student with ID 111819 puts in his/her ID you want the Dept/Sub/Marks etc to be displyed?
If your first question is resolved, please vote up :)
lenthy post well that is all about the PHP
You need to include your post data or the sql is not goning to update any info.
To double check the data is populated in the POST array:var_dump($_POST);
If this is showing the data, you will need to clean it (never trust user input)
Then assign the POST data:
`
$Studentid = $_POST['Studentid'];
$id = $_POST['id'];
`
You should then be able to update the data in the DB
$host="localhost"; // Host name
$username="root"; // Mysql username
$password="root"; // Mysql password
$db_name="project"; // Database name
$tbl_name="add_marks"; // Table name
// Connect to server and select database.
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
// update data in mysql database
$sql="UPDATE $tbl_name SET Studentid='$Studentid' WHERE id='$id'";
$result=mysql_query($sql);
// if successfully updated.
if($result){
echo "Successful";
echo "<BR>";
echo "<a href='edit_marks.php'>View result</a>";
}
else {
echo "ERROR";
}
Is this the code you use to update the DB?
Where is the POST data?
Can you provide your form code, and also the DB layout?
You have missed the ";"
<label class="grey" for="firstname">Firstname:</label>
<input class="field" type="text" name="firstname" id="firstname" size="23" value="<?php echo $firstname; ?>"/>
looks good totti2007
<form action="home.php" method="get"> Email:<input type="text" name="email"/> </form>
also try adding id="email"
<form action="home.php" method="get"> Email:<input type="text" name="email" id="email"/> </form>
karolismf, you are wanting to URL rewrite (aka MOD_REWRITE), this is done via .htaccess file.
So for example you could turn this url:
www.somewebsite.com/index.php?s1=43&s4=44
Into something like:
www.somewebsite.com/43/44
the error you are seeing is relating to the login details/access rights.
Is the DB user you are using got access rights to the database it self?
Oh BLISS! Thanks Squidge +1 from me!
lol, you are welcome
Thank you diafol. I am starting to learn OOP. I haven't heard of 'Yii', i will have a look at that.
I did look at Zend and well..... very almost gave up :)
I used Aptana 3 a while back, but it kept locking up on me for a starnge reason
not sure if this is correct but remove the die statment from your redirect:
<?php
if ($Count == 0)
{
mysql_close();
header("Location: Errors/Login/Existance.php");
exit();
}
?>
Also check the relativness of the path to your current script
I have been looking over current frameworks available and I am looking to settle on CodeIgnitor.
What framework and IDE do you use?
What are the plus sides, limitations of your choice?
@BadManSam, for user login form as veedeoo syas if this is not done correctly you can leave your complete system open for some very powerful attacks.
I would suggest a frame work that has been tried and tested and maintained. 2 that come to mind would be Zend_Framework found Here, or CodeIgnitor Here
Both are throughly tested for attacks, and will give you the functionality you are after
mysqlquery("SELECT image_id FROM image WHERE ???");
Why not :mysqlquery("SELECT image_id FROM image WHERE user_id = $_SESSION['user_id']");
Are you getting an error message at all?
Are you amending
require_once ('includes/config.inc.php');
require('../connections/dbconnect.php');
to ensure the correct login details
that would indicate the include file is not being created
You could always change the string to lower case if you do not want to take case in to it:
$username='TestName';
$user='testname';
$username = strtolower($username);
$user = strtolower($user);
if ($username==$user){
print "This is the result I want." ;
}else{
print "This isn't the result I want." ;
}
"UPDATE web_members SET name='$name', lastname='$lastname', email='$email' WHERE id='$id'";
$PDO_con = new PDO; // Create DB connection
$sql = "UPDATE web_members SET name='$name', lastname='$lastname', email='$email' WHERE id='$id'";
$q = $PDO_con->prepare($sql);
$q->execute; // Execute cmd
But what does this mean?
An example
i maybe wrong but i think you need to have your session before any output, also i notice you are changing between MySQL and MySQLi. Is there a reason for that?
in php i insert some data into database. In database s_no automatic increase when any data instered.
I want to get that s_no. how do i get it.
Newbie1234, can you show some code you are using? What is the naming in you db table?
YOu would get the s_no (assuming primary key?) in the exact manner as you would any other data from the database
Select s_no from 'table' where s_no = 'something'
what work have you already done in your student project?
All of these can be done, have you look over PHP.net?
+1 for PDO
"INSERT INTO Crews (ID, Driver24, Medic24, DriverDay, MedicDay, DriverCall, MedicCall) VALUES('$_POST[Driver24]', '$_POST[Medic24]', '$_POST[DriverDay]', '$_POST[MedicDay]', '$_POST[DriverCall]', '$_POST[MedicCall]')";
UPDATE table_name SET field1=new-value1, field2=new-value2 [WHERE Clause]
update crews set Driver24='$_POST[Driver24]', Medic24='$_POST[Medic24]',DriverDay='$_POST[DriverDay]',MedicDay='$_POST[MedicDay]',DriverCall='$_POST[DriverCall]',MedicCall='$_POST[MedicCall]' WHERE id='$_POST[id]'
To do a redirect after the SQL query you would use:header("location:[page to redirect to]");
To edit existing data in the DB you would want to obtain the data from the DB and display in the text fields:
eg <input type="text" name="Medic24" value="<?php $variable_of_the_data; ?>size="60" />
You would change the "INSERT" into an "UPDATE" statement and use the 'ID' against the WHERE clause
Hope that helps
*EDIT:
You should also clean the form input before inserting/updating the database. don't trust anyone (in regards to form input)
error log output? any error showing in the browser?
Simplest way
use a form with 3 fields.
current password
new password
Confirm
Compare the current to that already in the DB table, use if stmt so if it is ok, then compare the new and confirm. If these match, update. If not throw exception
DHCp server can be used for many things. If you have no need fo rit, i wouldnt worry to much. They assign IP address to units in a network, for example if you have a PXE server, any unit that connects to this would require an IP, so DHCp assigns for this, and away you go.
Inregards to where your PC's are getting there IP/DHCP from, this would be your router. Most modern routers, will act as a DHCP for easy local network setup. If you wanted to use a DHCp server you would need to disable this in your router. However this would require you to leave the DHCP server always on.
have you checked the firewall? add an exception
error logs?
yes. I would suggest driving the AVAILABLE page by PHP and database
dwlamb, with includes you need to include the path unless you have include the include path in your ini file
It seems this is an issue with PHP 5.
Really??? you have an error some where
data objects, are not stored data like a database, they are the data from the data base stored in objects.
This may help Click Here
thanks to all.
i think diafol is right, i will try it.
let me know how you get on. looks interesting
no is the short answer to that, PHP is a server side logic language. You would be looking at C, or C++ something like that
do you have a typo in the file name?
is that the file location?
to be honest I have no idea, could be to do with UAC on the OS.
can you export the IIS setup and import to your other server?