Jump to content

paulman888888

Members
  • Posts

    332
  • Joined

  • Last visited

    Never

Everything posted by paulman888888

  1. I don't know if this is the right place to ask but ill ask anyway. I have being looking for a shopping cart / checkout script, i have found some good ones but there not what i am looking for. What i am after if when the cash transfer completes instead of sending out a object i want to change a value in my database. Now the showcase part; User login --> User add something to cart --> Goes to check out --> Pays Server gets told about payment --> If payment went well --> Run MySql query to change some variables in database. I hope thats clear. Basically i want a a checkout system that doesn't send out a dispatch but runs a script. Thankyou for your time Paul
  2. I don't know where to start with this. I have a database of postcode, longitude and latitude and location name. But what i want to do now is a distance between two codes, i thought of getting both posts longitude and latitude and doing some calculations but i don't know what sort of calculations i would do. But then i thought about a radius search and i thought about getting the starting postcode and erm. Stuck. Any ideas? This isn't a PHP question really because i could make it when i find out the relation ship between longt and lati and miles. If you understud what i am asking (1st of all your smart because i've said everything in a strange way) can you help Thankyou all Paul
  3. I wouldn't recommend java as flash is much more popular for games. and my stats script say only %50 of people have java and %98.2 have flash. Just thought you might like to know
  4. hi; this works but i want to add a little to it but i am not good in javascript but am in PHP. Heres the code <input id="textinput" type="text" name="username" maxlength="30" value="'.$username.'" onkeyup="document.myImage.src=this.value"; /><img src="default.gif" name="myImage"> I want it to go to include.php?inc=image&value=THIS.VALUE but i can't because the whole think doesn't work. Please Help me add to this code so that when onkeyup the image changes to include.php?inc=image&value= then the value of the form. Thankyou Paul
  5. Thankyou so much corbin & kickstart Great help Thanks again it all works now thankyou Paul
  6. look up .htaccess URL REWRITE rules and conditions google it All the best Paul
  7. this isn't answering your question but you query isn't safe $phpecono1 = mysql_query("SELECT * FROM photo where id_page='$_GET[id]'") or die (mysql_error()); should be something like; $id=mysql_real_escape_string($_GET['id']); $phpecono1 = mysql_query("SELECT * FROM photo where id_page='$id'") or die (mysql_error());
  8. add an if if(isset($_POST['submit'])){unset($_SOMeTHING)}
  9. i got told it was good practise. So what back ticks should i remove? Thankyou Paul
  10. You need to get GLOBAL variables <?php class werb { function page_theme() { include_once('config.php'); echo "dbhost: $dbhost"; } } ?> should be <?php class werb { function page_theme() { global $dbhost; include_once('config.php'); echo "dbhost: $dbhost"; } } ?>
  11. hi; i have used MySQql for ages but i am now getting strange results, Heres my code; <?php $username=no_slashs(strtolower($_REQUEST['user_name'])); $q=mysql_query('SELECT * FROM `chess_users` WHERE `username`=`'.$username.'`', $link_chess)or die(mysql_error()); if((int)mysql_num_rows($q)>0){echo "no"; }else{ echo "yes"; } $show=0; ?> What i was trying to do is see if there is any usernames with the value of $username but for some reason when i test my script like this; page.php?user_name=bob i get this error; Unknown column 'bob' in 'where clause' i though it goes like this WHERE `colounm`= `value` Please help as this is starting to annoy me Thankyou Paul
  12. hi; I found sometime back someone asking how to get htaccess to split up fake folders into real variables and values; ill explain, something like site.com/variablename1-variablevalue1/variablename2-variable value2/ went to this site.com/?variablename1=vabariablevalue1&variablename2=variablename2 basicly the variables name and value were seperated by '-' How would i go about making a loop which puts all variable names and values into a understandable form for PHP? Am not good with htacces but good with PHP. Thankyou Paul
  13. Hi; 1st of all thankyou for reading this. I am trying to make a function that will keep looping lots of variables thats passed to it. Let me explain; function make_link($a1,$a2, $b1,$b2, how do i make a loop that will get all passed to it? sometimes just 1 is passed and other times upto 20){ //now another loop i think i will need to use foreach but dont know how $returnme='index.php?'; foreach(somecode here not sure what){ $returnme.=$a1.'='$a2.'&'; }return $returnme;} in more detail each letter has 2 parts, 1 and 2 1=variable name 2=variable value the reason i want to do this is incase i want to use .htaccess and it would be much easyier generate links than to go change them all myself. Thankyou Paul
  14. Thankyou all again. With your help i fixed it. <a onclick="window.location.href='index.php?page=Packages&id='+request.package.selectedIndex;" href="#"> View Package Details </a> The reason it didn't work was because i used .value a the end but its not a text field so it didn't work. i had to use .selectedIndex and remove the stuff before. it Thankyou again Paul
  15. Thankyou for the help but it still is not working. Heres the firefox error console; Error: Document.Form is undefined Source File: http://testing.hidden address.com/index.php?page=Request# Line: 1 Heres the update javascript code with PHP removed. <a onclick="window.location.href='index.php?page=Packages&id='+Document.Form.request.package.value;" href="#"> View Package Details </a>
  16. I am a happy at PHP but i wanted to start learning JavaScript so after reading off w3 i started to make a link using a form. here is what is out puted after PHP. I decide not to show you the PHP incase you dont do it. Heres the javascript line <a href="#" onclick="window.location.href='?page=Packages&id'+Form.request.package;"> View Package Details </a> What i tryed doing is making JavaScript Take the user to a new page but useing a bit of information selected by the user from a drop down menu form. <form id="request" method="POST" action="index.php?page=Request"><br /> <input id="name" style='width:70%;' name="name" type="text" maxlength="50" value="Name" /><br /> <input id="email" style='width:70%;' name="email" type="text" maxlength="250" value="Email Address" /><br /><select name="package"><option value=" ">Guru</option><option value=" ">Starter</option><option value=" ">Advance</option><option value=" ">Master</option><option value=" ">Basic</option></select><a href="#" onclick="window.location.href='?page=Packages&id'+Form.request.package;"> View Package Details </a><br /><textarea id="msg" style='width:90%; height:200px' name="msg">Please Enter Your Plan Here Including what feature you want, like; Guessbooks, Forums, Upload area, Members area and ect.</textarea><br /> <input id="Submit" type="submit" name="Submit" value="Submit" /></form> Please help me my this link work. Thankyou for any help Paul
  17. thanks guys. It works now, i over looked that closes quote. Its always the little things, 8bit or 1 byte stopped a whole script from working. Thanks again
  18. Hi; Ill get to the point. This code should work but i don't no why it doesn't. $query="INSERT INTO `requests` (`name`, `email`, `msg`, `status`) VALUES ('$name, '$email', '$msg', `$status`)"; And in my table there is id, name, email, msg, status. id=int name=varchar email=varchar msg=blob status=int Thankyou for all help in advance Paul
  19. thankyou I found out was wrong and now i fixed. Thanks again Paul
  20. Hi people, Heres the code $query="INSERT INTO `list_members` (`username`, `password`, `email`, `dob`, `userlevel`, `userable`) VALUES ('$username', '$password', '$email', '$dob', 1, 1)"; ///// end add user $rtytr=mysql_query($query); It should work but it doesn't. When i test it with if($sql=false){ die('Error Putting data in.');} It doesn't die or put the data in. Please Help Paul
  21. When in Firefox everything looks good and how it should, but when in IE it looks weird and things get moved. Its the same code but why is it different in IE? Please can you have a look The site it http://listed.freehostia.com/ if you want to view it. Below is the code to the page template (HTML only) i have removed PHP code and replace the content of the body with example text to save space. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><title>Listed - </title><link href="style.css" rel="stylesheet" type="text/css" /><!--[if IE]><style>#head_container ul{margin-top: 56px;}#content_container{float: left;}</style><![endif]--></head><body><div id="top"><div id="head_container"><ul><li><a href="?page=Home">Home</a></li><li><a href="http://listed.freehostia.com/?page=My_Account">My Account</a></li><li><a href="http://listed.freehostia.com/?page=Logout">Logout</a></li></ul><a href="index.php" id="logo">Listed - </a><br /></div></div><div id="wrapper"><div id="main_container"><div id="menu_container"><div class="content"><h1> Main Menu</h1><ul> <li><a href="http://listed.freehostia.com/?page=Home">Home</a></li> <li><a href= "http://listed.freehostia.com/?page=View_Topics">Topics</a></li> <li><a href= "http://listed.freehostia.com/?page=Stats">Stats</a></li> <li><a href="http://listed.freehostia.com/?page=Chat">Chat</a></li> </ul> </div><div class="content"><h1> Members Menu</h1><ul><li><a href="?page=My_Account">My Account</a></li><li><a href="http://listed.freehostia.com/?page=Add_Topic">Add Topic</a></li><li><a href="http://listed.freehostia.com/?page=LogOut">Log Out</a></li></ul></div></div><div id="content_container"><div class="content">Example body data</div></div><div id="clear"></div></div></div><div id="footer">Copyright © PHP9<br />You are Logged In as Paul</div></body></html>
  22. I have read that 'HEADER ERRORS - READ HERE BEFORE POSTING THEM' but i still have no look. page 1.php header("Location: http://mysite.com/?page=logged_out"); //this works page 2.php header("Location: http://mysite.com/?page=Members_Home");// this doesnt Both files are included by the same script and have simlar content on each page. page 2.php when redirected gets this error; But when i press refresh it works Why is this? Thankyou all so much Paul H
  23. try useing some software to help you learn abit of mysql i use 'TOAD' Google it. ITs free and has several forms for you to fill in, its then creates some Mysql Code, Shows you it and excutes it. If it doesnt work it will tell you in simple english (No error codes that are very long and strange) what is wrong and what you need to do. Also just check if your MySql Database is open to 'Remote Database Access'! Hope i helped in a way
×
×
  • 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.