|
Thanks It will help me a lot.
Jinal Desai
|
|
|
|
|
|
I'm not even really being sarcastic when I say there isn't a best one, and you'll probably hate them all and eventually convince yourself that your only recourse is to write your own.
Honestly Illustrated
<Pretentious> Raid tha manyuhl. :E
<Pretentious> Aw raid eh own mah meaxbile. :E
|
|
|
|
|
hello, i am in the process of making a download counter for external link, so when the user clicks the link to dilesharing site the download is noted and 1 is added to the mysql database ...
here is how i make the id...
echo"<a href=\"download_count.php?id=". $row['upload_id'] . "\">Download</a>";
now i get this when i click download ...
http://localhost/website/download_count.php?id= 54
now thats related to the record in a mysql databas, as you have probably guessed ....
how do i get that id in the url so i can use it in the download_count.php file which will allow me to make a function to add 1 ??
thanks for all your help in advance ...
|
|
|
|
|
a little Google action would have yielded pages such as this one[^].
|
|
|
|
|
hello guys....can we install Zorine OS on virtualbox??...thanx for the answer
|
|
|
|
|
Yes.
However, as seen as it will be running in a VM, you should find out if the OS supports the virtual hardware (ie. network adapters).
|
|
|
|
|
I have a great website that is my capture page. Others would like to use it also. How do I add a parameter that would allow me to add a user to my site like website.com/username..
I'm normally a .net programmer, this is my first php programm..
Could I have an code sample too...
Thanks..
|
|
|
|
|
Are you talking about a parameter (GET or POST) or somehow fiddling with the URL? I'm not sure I follow what you want to do.
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
I want to have 3 or 4 people to sell products from my website by sending others to view it. They need to send them there with a link that contains an input parameter that is their id so they can get credit for the online sale. So what is the best way to do this?
|
|
|
|
|
I'd probably use a HIDDEN field to send a GET or POST parameter to a PHP page that looks at the parameter and figures out who to give credit to, then sends them on to the link.
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
hello, i am hoping someone will be able to help me with this, i have a basic login form using md5 encryption....
Login.php (the form)
<?php echo '<div id="errors">'.$err.'</div>'; ?><br/>
<table><tr><td>
<form method="post" action="login_go.php">Username:
</td><td>
<input typ="text" name="user">
</td></tr><tr><td>
Password:
</td><td>
<input type="password" name="passcode">
</td></tr><tr><td>
<input type="submit" value="Log In"></td></tr></table><br/>
login_go.php (the processing)
<?php
session_start();
Include("connect.php");
$username = ($_POST['user']);
$password = md5($_POST['passcode']);
$q = mysql_query("SELECT * FROM users WHERE user = '$username' AND pass = '$password'") or die (mysql_error());
$r = mysql_num_rows($q);
if ($r == 1) {
$_SESSION['logged'] = TRUE;
$_SESSION['user'] = $username;
$_SESSION['email'] = $email;
$_SESSION['date'] = $joined;
header("Location: members.php");
exit();
} else {
$err.='Incorrect username/password!';
Include("login.php");
}
?>
On my database, the password is encrypted correctly but when i come to login i only need to enter the user and i gain access, and when i put a password into it, i then get an error .... what have i done wrong ? ?
Thanks
Steve
|
|
|
|
|
First, you should really escape the $_POST['user'] value before putting it into an SQL query:
$username = mysql_real_escape_string($_POST['user']);
As for why it logs you in when the password is left blank, my guess is that the hashed password is actually the MD5 hash of an empty string. In other words, the correct password is a blank password.
SELECT MD5('') gives me d41d8cd98f00b204e9800998ecf8427e - is that what you have?
|
|
|
|
|
yeh actually, i have just took the md5 encrypting off and it inserts nothing into the db and i do get d41d8cd98f00b204e9800998ecf8427e .... how do i fix this ?
modified on Friday, April 23, 2010 6:19 PM
|
|
|
|
|
Fixed it , thanks for all your help ...
|
|
|
|
|
I have agridview i fill it from datatable but i want to add new emptyrow af first before filling
|
|
|
|
|
If it is not related to Linux then you are in the wrong forum. And please do not shout
"I'm willing to admit that I may not always be right, but I am never wrong." - Samuel Goldwyn
|
|
|
|
|
Hello friends,
I am using window.open function in order to display the page. The page pop up but fixed params i.e. height & width. However i want that it will be resizable as per the content of the page following is the code
<pre>
window.open("EmpSubCert.aspx?Request_ID=" + requestId, "attendee_popup", 'left=400,top=400,resizable=no,scrollbars=no,height=150,width=500,toolbars=no,titlebar=no');
</pre>
which param i ll add in the above code such that the pop up window display entire content of the page..
|
|
|
|
|
Well, first you have set resizable=no,scrollbars=no so that would be a problem for a user. You have also set the position, height and width, so that's the size you get. What you'll probably need to do is figure out on your own what size you need, then change the height and width parameters accordingly.
In view of the variety of browsers and fonts that people might use, that may or may not be feasible in your case.
Good luck!
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
hello, i hope one of you lot can help me ...
i am creating a form for registration to my site... it all works i just need to know how i would position an error from process.php eg//
echo('The username/email you have entered already exists, please try again');
include("register.php");
in the registration document register.php, is there a way to put this certain "echo" into a div ?
div id = " error " / d i v <pre>
Thanks
|
|
|
|
|
function byId(el){return document.getElementById(el)}
<div id="msgTgt"></div>
byId("msgTgt").innerHTML = "The username/email you entered already exists, please try again"
|
|
|
|
|
I try to write in a way people understand simply, so if its a little "fluffy" then I apologize in advance.
I'd probably make a function that scans the inputs from the form, and checks them.
Then the second part of the function would be to spit out the errors that were made.
Kind of like (e.g.) if the username space is blank, then report an error. The div id 'errors'
would be where your errors would be spat out.
(Registration page)
<div id="regform">
<div id="errors">
<?php
validateInputs();
?>
</div>
<?php
include("register.php");
?>
</div>
(Function, theory I guess)
function validateInputs(){
$username = $__POST["username"]; #name referring to the entities of <input name="nameHere" >
...php script that checks the length of the input, and for false positives, like a bunch of spaces,
or perhaps a name consisting of one character, or patterns like that. Also use it to check if the username
is being used or not...Then echo out what errors were triggered, on that page, and if you have no errors,
you could give a check image or something. I'm not too sure.
}
hope this helps.
I heard you can also do form validation with jQuery
http://www.webreference.com/programming/javascript/jquery/form_validation/[^]
|
|
|
|
|
Thank you, thats very helpful :P
|
|
|
|
|
Hello everyone,
Im having a problem in sending email in other domain name like yahoo and gmail
using mail(). It only accept the domain name of the company like @sample.com
Can anyone help me how can i fix or how can i configure the mail server to accept
other domain name?
Thanks in advance,
jyn
|
|
|
|
|
You'll have to tell us what brand is your mail server.
If it's your company server, it's probably the SMTP component of Exchange. This is configured by default to only relay mail originating from domains which it controls.
If you're the mail administrator, RTFM.
If you're not the mail administrator, it's time to buy the mail administrator a drink 
|
|
|
|