Jump to content

gnetuk

Members
  • Posts

    50
  • Joined

  • Last visited

Everything posted by gnetuk

  1. ////////////////////////////////////phyco copy right } else $pwd = ($_POST['pwd']); $query = "SELECT empid FROM users WHERE $pwd='empid'"; $result = mysql_query($query); if ($pwd=$result) { header("Location: setpass.php?msg=ERROR: you dont have the password...."); }else sorry to spam this is working now as long as the first charickor in the empid field has one letter it will work is it my sql table that's causing the problem?
  2. im not sure whats happening but if my password is 1 thats the only time it will not ask to change the pass.
  3. also i have noticed that it will only work if there employee id = 1 the number any tother number or letter makes the setpass.php load and that sould only load if there password matches the empid.
  4. varchar(200) latin1_general_ci No is this it?
  5. Oh this is only working for letter atm, and not numbers.
  6. couldn't paste all that that I wrote gona get me a beer. this forum is ace love it!!!!!!!!!!!!!
  7. ////////////////////////////////////phyco copy right }else $pwd = ($_POST['pwd']); $query = "SELECT empid FROM users WHERE empid=$pwd"; $result = mysql_query($query); if(!mysql_num_rows($result)) { header("Location: setpass.php?msg=ERROR: you dont have the password...."); }else //Password matches an employee ID thanks to phyco//////////////////////////////////////////// //this forum is the best, ill be honest I know very little about //php apart from asking you guys for code I do understand but its //hard for me as I can only read it atm im still gona plod along //best I can.......... //Phyco you did it here's my bit I added that worked (and I wont //be lazy education like u gave is far better than someone just //handing it me on a plate)
  8. } $pwd = ($_POST['pwd']); $qry = "SELECT empid FROM users WHERE empid='{$pwd}'"; $sql = mysql_query($qry); $res = mysql_fetch_array($sql); if($res['pwd'] != 1){ header("Location: setpass.php?msg=ERROR: you dont have the password...."); }else // all this dose it make evey user whos empid dose not match goto the setpass.php (I only want users that match to go to promt them to change threre password) { header("Location: myaccount.php"); } //echo "Logged in..."; Hi when the user enters there password in the pwd field I need the sql to check the empid in the database (this is not md5 encrypted) then if the empid = the post password they enterd then it will goto the promt to change the password.
  9. you got it bro the password is there empid but they should be promped to change it at first login, no flaws in anyones code here but I sill not getting my desired result.
  10. hi im going to try it out but its if the empid maches the password they use to login with basicly the user registerd there password is there empid then when they login with there $_post pwd wich is not in md5 format if it is the same as empd then togo to the setpass page. see what I mean the md5 will always be encrypted that's a seprrate field in my db
  11. $md5pass = md5($_POST['pwd']); $selectuser="SELECT empid FROM users WHERE empid='$_POST[pwd]'"; $selectuser2=mysql_query($selectuser); $selectuser3=mysql_fetch_array($selectuser2); if ($selectuser3[empid]=$_POST['pwd']) { //die ("ERROR: password is empid."); header("Location: setpass.php?msg=ERROR: you dont have the password...."); } That's was not code that was just what I wanted to do I cannot write code as im self teached php here is my code
  12. Hi all Its me again, I been trying to get this to work for ages now on my own with no joy so I gona need a lttle help Ok I have a login page and I want the page to login and redirect to another page if the password matches a certern field. IF $_POST[pwd] = empid then goto setpass.php Just need the code as my coding is not working
  13. Thanks so much for that, I will try when i get home not sure if there is a thankyou button on here but thanks again, all the best ch0cu3r g-
  14. Hello all good day. I am working on my new project atm, and it requires that registerd users will have rank status, 0 , 1 , 2 , 3 , 4 4=SUPER ADMIN ok i need so that anyone less than rank 3 can use the registration form. I cant provode my code as my www is on local host and im away from that pc atm. so in a nut shell SELECT rank from users where name = SESSION_['user'] IF rank = < 3 die (you dont have privlage) Hope you guys can help g-
  15. Hi all. Can someone tell me why i get two emails when somone has activated on my site. I only need the one lol. heres my code <?php session_start(); include ('dbc.php'); if (!isset($_GET['usr']) && !isset($_GET['code']) ) { header("Location: register.php?msg=ERROR: You have not activated PLEASE USE VALID E-MAIL...."); }else $rsCode = mysql_query("SELECT activation_code from usersgnet where user_email='$_GET[usr]'") or die(mysql_error()); list($acode) = mysql_fetch_array($rsCode); if ($_GET['code'] == $acode) { mysql_query("UPDATE usersgnet set user_activated=1 where user_email='$_GET[usr]'") or die(mysql_error()); mail( '[email protected]', 'ACTIVATION A C T I V A T E D D O N E new member SET', 'Check the http://gnetuk.net/forum/admin/index.php', "From: \"www.gnetuk.net DO NOT REPLY\" <[email protected]>\r\n" . "X-Mailer: PHP/" . phpversion()); }else { header("Location: register.php?msg=ERROR: You have not activated PLEASE USE VALID E-MAIL...."); die("chedktjhe. Pultravigenslips.."); } ?> Any ideas. gnetuk :-)
  16. Adam is right i can read code but cant write it...... DevilsAdvocate & Adam you have made my wish come true. Dont get me wrong i will always try to find this things out for my self Devils you line worked too. i can now have echo without the ++++++'s for spaces , it just drives me mad how two simple lines of code can work more wonders that the whole google reading thing. Like i say i can read it..... just wish i could write it waell as u guys. thanks both for the quick responce and solutions <G>
  17. Sorry for noobness waht do you mean from opposite? can i has code?
  18. This works fine $emsg = urlencode($emsg); I can use spaces and the TXT/SMS will send with the spaces. But............................ I have a echo output on my page to explain to the user what has happend. echo "<br>"; echo "<font size=\"4\" face=\"Courier New\"><div align='center'>You Has SENT a message to this phoneNO : <b> $name </b></div>"; echo "<font size=\"4\" face=\"Courier New\"><div align='center'>And entered this MESSAGE : <b> $emsg </b></div>"; echo "<br>"; but the output uses + as a space this is fine but fine tuning why cant it just use a space instaead of the + im just glad i have got this far..............
  19. you need a reward. i been on this for so long now worked first time. ok but i may be picky but the echo result on my page has + for the spacebars. any way of not showing the + its like hello+i+am+your+friend. dont worry about it you have just made my menelium.
  20. Adam thanks for your responce. But i am no coder. How culd i run this through urlencode(), what would i need to ad to my existing code to achive this?
  21. I am trying to use CURL on a site., to send SMS/TXT messages. HERE IS THE CODE $name = $_POST['name']; $emsg = $_POST['emsg']; $ch = curl_init("https://www.smsfun.com.au/api/login.php?mobile=emma&password=123456&send_to=$name&message=$emsg&send=1"); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $output = curl_exec($ch); curl_close($ch); Then i use my form like this <form method="post" action="" value ""> <p align="center"><strong><font color="#0000FF" size="5" face="Courier New, Courier, mono">MOBILE NO<br> <input name="name" type="text"> </font></strong></p> <p align="center"><strong><font color="#0000FF" size="5" face="Courier New, Courier, mono">message</font><font color="#0000FF" size="5" face="Courier New, Courier, mono"><br> <textarea name="emsg" value "$emsg" rows="5" wrap="VIRTUAL"></textarea> </font></strong><br> <input type="submit" name="submit" value="SEND"> </p> </form> This all works fine but if the user needs to put a space after a word i.e "hello this is a test" this wont work only "hellothisisatest" will. Am i missing somtink here? I tryed googleing etc cannot find the answer. Please help Thanks g-netUK
  22. the responce and joobs that come up are my account information i wanted to bypass that and have it go back to my page.
  23. Thanks adam, but i dont understand cURL. Do you have a php script i could use for runnign the prosess in the background then closes the window quickly apart from the form the only code i have is there API witch is . https://www.smsfun.com.au/api/login.php?mobile=44567892265&password=<<YOURPASSWORD>>&send_to=<<TO_NUMBER_INTL_FORMAT>>&message=<<MESSAGE>>&send=1 My form works for the acutual funchtion of sending SMS/TXT messages. but as i say i dont want it to re-dirrect to the smsfun. site try it out http://gnetuk.net/gsms.php
  24. Hi all This is a new one for yas. I want people to send SMS /TXT from my site. I got the form working fine. but it re-directs to the site that povides the sms ?????? how do i call up the prosess automaticlay without diverting from my form/orSITE heres my code <?php if(isset($_POST['submit'])) { $name = $_POST['name']; $msg = $_POST['msg']; header("Location: https://www.smsfun.com.au/api/login.php?mobile=44775080062265&password=100256&send_to=$name&message=$msg&send=1"); echo "User Has submitted the form and entered this phoneNO : <b> $name </b>"; echo "<br>User Has submitted the form and entered this MESSAGE : <b> $msg </b>"; } ?> <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <input type="text" name="name"><br> <input type="text" name="msg"><br> <input type="submit" name="submit" value="SEND"><br> </form> zthis works Im thinking mabee opening the page and closing it may need a scipt can anyone help all the best gnetuk.
  25. Hahahaha nice one still lol ill close this post then. XD
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.