What is this doing. What do these variables do mean?
$a = $row['workingtime'];
$b = $row['workedtime'];
1. You send email, regardless of whether If condition is true or false.
2. While loop isn't closed ('}')
What is this doing. What do these variables do mean?
$a = $row['workingtime'];
$b = $row['workedtime'];
1. You send email, regardless of whether If condition is true or false.
2. While loop isn't closed ('}')
forums are for question to be discussed. so what's your question?
I cannot get what is the issue: Not working? Not formatting well? Not doing what?
Mark it solved then :)
@evstevemd
I was wondering if you could give me your thoughts on a couple of frameworks I've seen on the web. one of the is X-Jax from http://www.xajax-project.org/ and Lithium from http://lithify.me/ I'm trying to learn how I can make a website that utilizes AJAX heavily while still working in a MVC framework (I hope thats possible).
Thanks to everyone for your great suggestions
I won't suggest you go for ajax-ified framework. I would say Check framework and Ajax library. as for me I will say take Codeigniter and JQuery :)
If you don't mind Try wxWidgets. from version 2.9.x you can use wxBase which have no GUI components Just console. Remember to compile with unicode flag set.
wx is known to work with Unicode "naturally" when compiled with Unicode. also there is wx-SDL tutorial.
I have been a professional developer since before the web came along. .....But PHP is 10 + years old. Yes there are billions of site written it it. Just as there were billions of lines of COBOL and FORTRAN 20 years ago. Now they are extinct.
Do you mean because it is 10+ old it is outdated like the two? Professional developer giving such statement? No way :-O
May be We should throw the outdated C++ before PHP since it have been long way 1979. PHP have been around since 1995. C language is supposed then to be in trash cans as it is even older than C++.
No offense intended but your "professional" is questionable due to criteria you set. may be after seeing your posts in this PHP section we can confirm your claims to professionalism. Also I hope the two links (which I didn't visit) are not Marketing links :)
echo "<input type='text' name=$rows[0] value=$rows[0] /> <br />";//UserID
echo "<input type='text' name=$rows[1] value=$rows[1] /> <br />";//Username
echo "<input type='text' name=$rows[2] value=$rows[2] /> <br />";//Password
echo "<input type='text' name=$rows[3] value=$rows[3] /> <br />";//fname
echo "<input type='text' name=$rows[0] value=$rows[0] /> <br />";//UserID
echo "<input type='text' name=$rows[1] value=$rows[1] /> <br />";//Username
echo "<input type='text' name=$rows[2] value=$rows[2] /> <br />";//Password
echo "<input type='text' name=$rows[3] value=$rows[3] /> <br />";//fname
I have made quite a lot of use of polymorphism, and turning out to be very useful :)
Pretty much have my code working now, however the results are not what I expect; so some more debugging to do to make sure there aren't any silly errors anywhere.
Thanks for all the feedback,
Kartik
:icon_wink:
I think it comes down to personal preference and how much more time you spend on one system as compared to another.
Final nail on coffin :)
The code works, but the incorrect data is not being displayed in the form. In the form, I a getting the character '/', and that is all. I have a column called fname that has names stored. The name is not showing up at all.
Here's what I am using for my code:<?php session_start(); if (!isset($_SESSION['memberusername'])){ header("Location: contractorlogin.php"); exit(); } mysql_connect('localhost','name','pword') or die( mysql_error() ); mysql_select_db('databasename') or die( mysql_error() ); $user = mysql_real_escape_string($_SESSION['memberusername']); $sql = "SELECT Username FROM contractors WHERE Username='" . $user . "'"; $result = mysql_query($sql) or die( 'Unable to execute<br>'.$sql.'<br>'.mysql_error()); ?> <html> <body> <form> <?php while($rows= mysql_fetch_array($result)){ echo "<input type='text' name=$rows[0] value=$rows[1] /> <br />"; } ?> </form> </body> </html>
Post your minimal DB schema and minimal values in db
i'll appreciate tutorials too if you dont mind. Thanks again
Registration goes like:
1. Present user a form
2. Receive form and Do some cleaning & Validation
3. Insert value in Database
4. Send notification/Activation link
Voila :)
I love PHPAcademy Youtube channel
Fedora is user friendly and ubuntu not much :)
Whaaaaaaat? :icon_eek:
Have you used both? Why have you come to the conclusion?
This code works, modify to your needs.
<?php
$server='localhost';
$username='xxxx';
$password='xxx';
$database_name='xxxx';
$conn = mysql_connect($server, $username, $password)or die("Cannot connect");
mysql_select_db($database_name, $conn)or die("Cannot Select given database");
$sql = "SELECT employee_number, full_name FROM user";
$result = mysql_query($sql);
?>
<html>
<body>
<form>
<?php
while($rows= mysql_fetch_array($result)){
echo "<input type='text' name=$rows[0] value=$rows[1] /> <br />";
}
?>
</form>
</body>
</html>
mr stevemd, its queens English, with some shorts and funk thats all...and pls take it easy, your diction denotes anger..are you a moderator???i hope not else this site'll be a concentration and you'll be KGB...kidding, but take it easy bro...and thanks for the link, am checking it out now, i hope its helpful...i'll appreciate tutorials too if you dont mind. Thanks again
"I need a car urgent please..." :)
I don't get paid here and no body is, at least AFAIK. So when people demands, it make somebody angry you know. But don't worry, I don't puch people and believe me I don't qualify for KGB ;)
And no, I'm not moderator, and If I could be one the first rule will be "Show your effort or find another forum" :)
Anyway, it is funny to help people who deserve help and I cannot help but "exhort" lazy people :icon_razz:
Terrain class
Was this intended to be a comment?
I have a copy of Visual C++ 2008 Express now, but I wish to create complex games, what would be best to use VC++ or C++ and a different compiler? If the latter, what compiler would be best for 3D 1st person view video games? (Such as Elder Scrolls type games).
Ah, Visual C++ 2008 is MS IDE that comes with C++ compiler among other things. In other Hand C++ compiler is another animal.
if ($ua="HelloWorld")
You are using an assignment operator '=' instead of a comparison of equality '=='.
And I didn't even saw that :icon_eek:
Thanks evsteve...this current code doesn't seem to work. It wont update the database. I am looking for help to get this to work and I think I am close.
I will advice you the best way to do these stuffs. Get your copy of MySQL workbench and connect to your local copy (remote site?) and test queries. Tweak them until they work. Transfer query to PHP. MWB have got syntax highlighting. You can also create view that acts as a table with all sums you need!
if you have alot fo inheritance may be you need to consider polymorphism
Wrong code...
else { $row=mysql_fetch_assoc($result); echo '<table><tr><th>' .implode('</th><th>', array_keys($row) ).'</th></tr>'; do { echo '<tr><td>'.implode('</td><td>',$row).'</td></tr>'; }while($row=mysql_fetch_assoc($result)); echo '</table>'; }
You wrote
while($row=mysql_fetch_assoc($result));
fist of all, it's
while(condition){ /*repeat something until it's false*/ }
Right code...
else { while($row = mysql_fetch_assoc($result)){ echo '<table><tr><th>' .implode('</th><th>', array_keys($row) ).'</th></tr>'; echo '<tr><td>'.implode('</td><td>',$row).'</td></tr>'; echo '</table>'; } }
He is using do...while
I'm using Unicode to test difference between 'a' and 'A'. So yes, it would have unicode. (I'm using GCC for Windows). And what third party libraries could I use?
(are there any other possible solutions?)
Check with POCO Unicode, if you have question ask in their forums
Double posting...ooughh!
Post your new code in this format
myfile1.php
<?php
//Code for MyFile1.php goes here
?>
myfile2.php
<?php
//Code for MyFile2.php goes here
?>
Thankx!! evstevemd & nbaztec !!
Finally I made up my fantastic code!!!
Because of your advises, I could learn a lot!!
I've got another Q, I'll try it with big smile!! :>
I Love people who show effort, Bravo!
If you have a question then welcome. For this thread mark it solved
That means if ($ua="HelloWorld") is always true. echo the value of $ua before comparison
calling $row=mysql_fetch_assoc($result) twice :icon_eek:
else
{
$row=mysql_fetch_assoc($result);
echo '<table><tr><th>' .implode('</th><th>', array_keys($row) ).'</th></tr>';
do
{
echo '<tr><td>'.implode('</td><td>',$row).'</td></tr>';
}while($row=mysql_fetch_assoc($result));
echo '</table>';
}
oooh I'm so sorry.
As I said, I'm new to all this and I don't know how to get php code. WOuld you lie to tell me?thank you!
Its for new bees
1. I get sick and tired of those lazy guys, so if you aren't the like don't post on their thread "soup for free, gimme one please". The whole thread heading fueled anger as to why someone will not work. So, you are welcome!
2. Use straight english. Not many here (me included) full understand the kind of english you use.
3. Say exactly what is not working, how did you suppose it work and how it currently behaving.
4. For complete noob, read PHP Guide for complete new bees
This c++ problem goes over my head..... lol
love shortcuts? They are long cuts under disguise :icon_lol:
Read and have the basics. Else you cannot resolve your question
Any help would be most appreciated!
??:icon_rolleyes:??
Haven't said anything is wrong/not fixed yet
Hint: Path may be incorrect!
src="/ImageGallery/Images/mmbg3xmx3g.gif"
supposing that you have your www directory at src="Z:/home/localhost/www/ and images in subdir ImageGallery/
Using relative paths is easier than absolute paths
:) I used __declspec first, and it worked just as well, it would just mean calling the functions in a different fashion (sort of) from within the script.
I'll look into the benefits, and thanks for the links.
May be this post is useful!
<form action="PHPTEST2.php" method="post" name="sign up">
Name: <input type="text" method="post" name="name"><br />
Last Name: <input type="text" method="post" name="lastName"><br />
<input type="submit" value="Sign Up Now!">
Correct this form first. It contains errors. Also Namke your files. I failto see which is php1 and which is phpxx. It is good behaviour to use meaningful names than phptestxxx
We need those errors to help you!
BTW have you skimmed though tutorial to get idea of what C++ looks like?
Without doing that will be like someone walking in streets of Dar es salaam going to Manzese and he have never been in Dar es salaam and don't have any map.
He will not get anywhere and will keep "making errors"
\
This won't be a issue at all.There are something called one way security architecture.
Just reverse engineering the decrypt/encrypt (encryption engine) algorithm does not
violate the confidentiality or integrity as long as you are using asymmetric encryption
engine.You can use a client library which is static or even use templates where you
need to reveal the source code of the engine.It doesn't matter.
But when the code is loaded into the memory and the encryption engine had successfully
ran over it, there no longer be confidentiality on the machine code level.
The bottom line of my post was, you can try hard but if they try harder...
Could you recommend some book to study of programming for me?
Now you are talking :)
Check there is recent thread on that and I shamelessly recommended, among others Soulie's tutorial at cplusplus.com
<?php
session_start();
if(isset($_POST['name']) ) {
$_SESSION['name'] = $_POST['name'];
header( 'location: PHPTEST2.php' );
}
else {
echo '<html>';
echo '<head><title>PHP</title></head>';
echo '<body>';
echo '<form action="PHPTEST2.php" method="post" name="sign up">
Name: <input type="text" method="post" name="name"><br />
Last Name: <input type="text" method="post" name="lastName"><br />
<input type="submit" value="Sign Up Now!">
</form>';
}?>
are you sure SDL can handle unicode? It seems C++ doesn't have Unicode support. So try third party libraries!
Oh! I thought Nathaniel10's post to be OP's post & hence I gave my step-by-step procedure thinking he didn't understand the question. Guess I screwed up this time past the 30min mark.
Will be careful next time. :(
Its ok!
there are people who would like to earn degree through another body, that is lying cheating....full garbage :)
Thanks, I successfully created a sample dll last night, the walkthrough didnt help as much as I'd hoped (I am using visual studio).
I had to just write the functions like so..
extern "C" int __stdcall ...
and then make a .def file to export them.
But I cobbled one together in the end using a few different snippets found in various places.
Always willing to try a new IDE though, thanks.
Poor __stdcall ;)
Check __declspec dllexport/dllimport
Also there is good tutorial in links below. Haven't looked through but name looks promising :)
Dlls are Simple. Part 1
Dlls are Simple. Part 2
Dlls are Simple. Part 3
Dlls are Simple. Part 4
const int Pi = 3.14; //Constant int toDeg(int rad) { return rad*180/Pi; } float x = 0.3f*Pi; // x = 0.3PI int n = 10; // n = 10 float valOrig = cos(toDeg(x)); //To degree from radian float valComp = 0.0f; //Compute this value float Es = (0.5 x pow(10,2-n); //Es float Ea = 0.0f; //Compute Ea later int i=0; //Loop counter do { valComp += pow(-1,i)*pow(x,2i)/fact(2i); //Maclaurin Series Ea = (valOrig - valComp)/valOrig; //Compute Ea i++; }while(Ea < Es);
That should be all.
Are you here to make people cheat their professors? :@
OP haven't shown any effort than dumping the question.So he/she will copy and pasted and cheat the prof. That is NOT what Daniweb is all about.
>> I'm now off to learn how to compile to dll in C++, maybe it will hook me
Assuming you have some version of Visual Studio, you might go through MSDN's Walkthrough: Creating and Using a Dynamic Link Library. It's close to the simplest console app/dll configuration that one can have.
P.S. I think you should not underestimate the cheat team's capability/motivation to hack the protection (due to their young age) - there are lots of resources on internet to aid in just that - in other words, be sure to give this a good go ;)
I have found CodeLite to be easiest IDE I have ever used. Microsoft VS is a way too complex, at least for me but many out there loves its debugging capabilities. CL have projects for DLL for both Linux/Windows.
Long ago I tried learning disassembling. It is worst brain exhauster AFAICS. It is not for faint hearted especially in world of 0234x564AFE
Check this tutorial if it helps.