Jump to content

redarrow

Members
  • Posts

    7,306
  • Joined

  • Last visited

Everything posted by redarrow

  1. can you kindly show me from this code your code working never got it going. i want two colmuns of data from a while loop cheers. [ need help with a while loop now cheers... i want the information below in two colums but how <?php while ($category = mysql_fetch_array($category_query)) { ?> <a class="mainpagekeyword" href="<?php echo generate_link('category.php',$category['slug']);?>"><div align="center" class="mainpagekeyword" style="color: #<?php echo $catcolour ?>;"><?php echo $category['category']; ?></div></a> <?php } ?>
  2. database connection. I was thinking how to stop bots and stop people useing a decaptcher. my fort is to use clickbox's with a form and two random numbers, the random numbrers will tell you what box to keep checked. if($_POST['submit']){ $num1=$_POST['num1'];; $num2=$_POST[''num2']; databse select to se if the number checked is also the number in the database. while loop with ,data mysql_fetch_assocc if($num1 ==$data['num1'] and $num2==data['num2']){ send them to correct page via header redirect i suppose. $num1=ROUND(1,5), $num2=ROUND(1,5), Database update with 2 colums id,num1,num2 defualt is zero's for num1 and num2 in the database, id is auto increment. Every time a person post to the database it updates 2 numbers random from Round function, the numbers will enter as random from 1 to 4 only. if post checkbox varables. $box_a=$_POST['box_a'']; $box_b=$_POST['box_b'']; $box_c=$_POST['box_c']; $box_d=$_POST['box_d']; get the database info, to show what two numbers to check the checkbox from the databese. it be 1 to 4 only but twice, your need to check two checkboxs, random was done twice. the value from the databse will have to be the value of the ordered check boxs. from 1 to 4. <form method="POST" action=" "> <input type="checkbox" name="box_a" value="1"> <input type="checkbox" name="box_b" value="2"> <input type="checkbox" name="box_c" value="3"> <input type="checkbox" name="box_d" value="4"> <input type="submit" name="sumit"> </form> } as you can see a little project just asking is it better then using written number and letter capcha....
  3. wontl work in my app going mad <?phph while ($category = mysql_fetch_array($category_query)) { ?> <a class="mainpagekeyword" href="<?php echo generate_link('category.php',$category['slug']);?>"><div align="center" class="mainpagekeyword" style="color: #<?php echo $catcolour ?>;"><?php echo $category['category']; ?></div></a> <?php } ?> i need to split the array so there more keywords side by side with a table like my above first example.... the above code gives you words with links and then you can go to a dynamic other page. now if i add another 10 words, i need it side by side like my first above example , if i leave it a very long list. but how does it split with a while loop this time ... need real help. advance thank you.
  4. it's seo complient so im happy.
  5. .mainpagekeyword { font-family: 'AgentRed'; src: url("font/fonts/AgentRed.ttf") format("truetype"); font-weight: normal; font-style: normal font-size: 16px; font-weight: bold; text-decoration:none; margin: 10px; color:#e8743f } I am trying to add a font the folder is font/fonts/AgenRed.ttf no error just does not work any ideas please? i done it. @font-face { font-family: "AgentRed"; src: url(http://www.your url/folder/font_folder/AgentRed.ttf) format("truetype"); } .mainpagekeyword { font-family: "AgentRed", Verdana, Tahoma; font-weight: normal; font-style: normal font-size: 16px; font-weight: bold; text-decoration:none; margin: 10px; color:#e8743f } DONE IT.
  6. ill give that a go cheers mate...
  7. ill use that idea sick are you the owner of sick seo softwere??
  8. i am a blind user so keyboard problams it all mouth typing sorry
  9. i am scrapping a whole seach engine and using 900 public proxy's thru php long time app i am working on also decaptcher app but the problam the whole 18 pages work except eregi pulls a error as it scrapes it i pump more bandwith to the code yes scrapes lovly but that no good for a avarage person.
  10. it in a 9000 scrape cue to slow needs preg_replace. function sanitize_string($string) { $string = ereg_replace(' +', ' ', trim($string)); return preg_replace("/[<>]/", '_', $string); } function takes for ever scraping
  11. why that then where dan
  12. $string = ereg_replace(' +', ' ', trim($string)); can someone preg relace in stead of eregi please ...
  13. <?php $a=array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","v","w","x","y","z"); $columns = 2; echo "<table border='4'><tr>"; for($i = 0; $i < count($a); $i++) { if($i%$columns == 0) echo "</tr><tr>"; echo "<td>".$a[$i]."</td>"; } echo "</tr></table>"; ?>
  14. <?php $a=array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"); echo "<table border='4'><t><td>result1</td><td>result2</td></tr></table>"; ?> how do i split a array up using foreach or a for loop forgot HELP please.... i want the table to have the results in the colums from the array but split correctly... thank you. john
  15. <?php $con=mysql_connect("localhost","username","password")or die("mysql_errow()"); $db=mysql_select_db("database_name",$con)or die("mysql_errow()"); if($_POST['submit']){ $firstname=mysql_real_escape_string($_POST['firstname']); $lastname=mysql_real_escape_string($_POST['lastname']); if( empty($firstname) || empty($lastname)){ echo" Sorry you need to enter a firstname and lastname <a href='".$_SERVER['PHP_SELF']."'>TRY AGIN</a>"; die(); } $insert="INSERT INTO database_field(firstname,lastname)VALUES('$firstname','$lastname')"; $insert_query=mysql_query($insert)or die('database error()'); if($insert_query){ echo" The database has your $firstname and $lastname cheers"; }else{ echo" sorry there a problam some where email me @ what ever.com"; } } ?> <html> <head> <title>submit username and lastname</title> </head> <body> <table> <tr> <td> <form method="POST" action=""> <br /> <br /> Please add your name. <br /> <input type="text" name="firstname"> <br /> <br /> Please add your surname. <br /> <input type="text" name="lastname"> <br /> <br /> <input type="submit" name="submit"> </td> </tr> </table> <br /> </body> </html> version 2 complete ... 10/10 i must say my self.
  16. <?php $con=mysql_connect("localhost","database_name","database_password")or die("mysql_errow()"); $db=mysql_select_db("database_name",$con)or die("mysql_errow()"); if($_POST['submit']){ $firstname=mysql_real_escape_string($_POST['firstname']); $lastname=mysql_real_escape_string($_POST['lastname']); if( empty($firstname) || empty($lastname)){ echo" Sorry you need to enter a firstname and lastname"; die(); } $insert="INSERT INTO database_field(firstname,lastname)VALUES('$fistname','$lastname'); $insert_query=mysql_query($insert)or die("database error"); if($insert){ echo" The database has your $firstname and $lastname cheers"; )else{ echo" sorry there a problam some where email me @ what ever.com"; } ?> <html> <head> <title>submit username and lastname</title> </head> <body> <table> <tr> <td> <form method="POST" action=""> <br /> <br /> Please add your name. <input type="text" name="firstname"> <br /> <br /> Please add your surname. <input type="text" name="lastname"> <br /> <br /> <input type="submit" name="submit"> </td> </tr> </table> <br /> </body> </html> Not tested at all.
  17. $query = "SELECT member.member_firstname,member.member_lastname,SUM(points) FROM tbl_points WHERE member.member_id='points.member_points_id'"; try that but it needs loads more work.
  18. look up join , your nearly there. http://www.tizag.com/mysqlTutorial/mysqljoins.php
  19. Hi every body, Not been on here for years, I did pop in know and then, but not with this proper account. Thank god that dan the admin still around he elp me so much, i got my account back. any way about me <> here we go lol. I am john and live in london and now 39 no lauthing, I have been doing computer for donkey years. I am here to refresh my own education from time and learn what missing from the mind. I must admit this web site and loads of ppl i have spcken to on here have been so friendly. best php forum in the world. so you all no, my spelling is crap, and i got very bad eyes near to blind, everthink hard for me but, i dont need sympothny just dont tell me off on the forums all the time for going on or spelling things wrong. from now onwords i have change my career and now a internet markeing seo consultant from home. my life is grate and things are getting even better. i dont mind a good old chat via messanger on here, i have made so many friends in the pass on phpfreaks been a real life saver. that it all the best redarrow. my real name is john.
  20. when i started and learnt, i wanted to no was i any good. i then done the good old clone jobs. facebook was just around (dont lauth) i learnt to clone that it was excitting, i learn so much css i didnt no at the time. then we all moved onto the youtube that came around so i had a go at that. then i wanted to go deeper so i cloned google and try to do algorithms for search terms. then i got into jquery. then i got into javascript/ajax that it, now a internet marketing and seo coinsultant from home, as i am disabled bad eyes. i have been using php for over 15 year,s maybe more, the best to earn money on the .net i can not wait till google come to london in king cross, ill be there eyes or no eyes ill met the deval him, self lol ps. if you think you no the basics of php,mysql,xhtml,css,jquery go for the exam... it took me over 3 years to no and understand regular exsprisions properly. geek talk
  21. Fist thing thanks for dan, sorting my account out cheers mate. Hi there all , long time no see. here is a code that the server keeps spitting out any ideas please? error code Error SQL query: -- -- Table structure for table `qa_admin` -- CREATE TABLE `qa_admin` ( `id` tinyint( 4 ) NOT NULL AUTO_INCREMENT , `user` varchar( 64 ) NOT NULL default '', `pass` varchar( 64 ) NOT NULL default '', PRIMARY KEY ( `id` ) ) ENGINE = InnoDB DEFAULT CHARSET = latin1 AUTO_INCREMENT =2; MySQL said: #1050 - Table 'qa_admin' already exists do you no any think about this error i have try the uploadf agin done that 100 times. yes i deleted the last insert sorry but it a 1050 error and the sql file huge there every where. -- -- Table structure for table `qa_admin` -- CREATE TABLE `qa_admin` ( `id` tinyint(4) NOT NULL auto_increment, `user` varchar(64) NOT NULL default '', `pass` varchar(64) NOT NULL default '', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; -- -- Dumping data for table `qa_admin` -- INSERT INTO `qa_admin` (`id`, `user`, `pass`) VALUES (1, 'admin', '1a1dc91c907325c69271ddf0c944bc72'); the tables get made but the database spit the info out.
  22. little update your getting there? <?php if($_POST['submit2']){ // Get the array of file[] from the form and process it. $allowedExts = array("jpg", "jpeg", "gif", "png"); $extension = end(explode(".", $_FILES["file"]["name"])); if ((($_FILES["file"]["type"] == "image/gif") || ($_FILES["file"]["type"] == "image/jpeg") || ($_FILES["file"]["type"] == "image/pjpeg")) && ($_FILES["file"]["size"] < 20000) && in_array($extension, $allowedExts)) { if ($_FILES["file"]["error"] > 0) { echo "Return Code: " . $_FILES["file"]["error"] . "<br />"; } else { echo "Upload: " . $_FILES["file"]["name"] . "<br />"; echo "Type: " . $_FILES["file"]["type"] . "<br />"; echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />"; echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br />"; if (file_exists("upload/" . $_FILES["file"]["name"])) { echo $_FILES["file"]["name"] . " already exists. "; } else { move_uploaded_file($_FILES["file"]["tmp_name"], "upload/" . $_FILES["file"]["name"]); echo "Stored in: " . "upload/" . $_FILES["file"]["name"]; } } } else { echo "Invalid file"; } } ?> <html> <body> <form action=" " method="post" enctype="multipart/form-data"> How many files to upload? <select name="number"> <?php for($i=1; $i<11; $i++){?> <option><?php echo $i; ?></option> <?php }?> </select> <input type="submit" name="submit1" value="Submit" /> <?php if($_POST['submit1']){ $number=$_POST['number']; for($n=0; $n<$number; $n++){ ?> <br><br> <input type='file' name='file[]' /> <br> <?php } }?> <br><br> Know upload all the files selected! <input type="submit" name="submit2" value="Submit" /> </form> </body> </html>
  23. Here a form for the user to select how many files to upload. The name file is now array() file[] Also your need to add another submit to get the info processed. <html> <body> <form action=" " method="post" enctype="multipart/form-data"> How many files to upload? <select name="number"> <?php for($i=1; $i<11; $i++){?> <option><?php echo $i; ?></option> <?php }?> </select> <input type="submit" name="submit1" value="Submit" /> <?php if($_POST['submit1']){ $number=$_POST['number']; for($n=0; $n<$number; $n++){ ?> <br><br> <input type='file' name='file[]' /> <br> <?php } }?> </form> </body> </html>
  24. you don't need to no nothing they do. and if they forget it then send them a email link to change the number. md5 and sha1 good for this. also if you do keep records of security numbers you might be liable of things there getting up to , in court. the user has to tel you on sign up there special number yea?
  25. make your own your self i say...... example only very easy to create. <?php $password="john"; $mypassword=md5(sha1($password)); $encrypt_password=mysql_real_escape_string($_POST($mypassword)); $unencrypted_password=mysql_real_escape_string($_POST($password)); mysql="INSERT INTO("user_id","encrypt_password","unencrypted_password") VALUES($user_id,$encrypt_password,$unencrypted_password)"; ?>
×
×
  • 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.