Jump to content

flyersun

Members
  • Posts

    35
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

flyersun's Achievements

Member

Member (2/5)

0

Reputation

  1. I'm sorry first I wanna say thank you for your help but I'm still no closing to working the problem out.. I don't really know the first thing about Javascript or not to write it.. You said you had done this before. Could you maybe show me an example of how it is done? I wouldn't ask but I'm on a deadline.
  2. I feel sooo stupid asking this but I can't work out why my scripts not working right. $to = $email; $subject = "Foto-junkies Registation"; $body = "Dear $first_name $surname <br /> Welcome to Foto-Junkies.co.uk <br /> Username:$username"; $headers = "From: Foto-junkies"; mail($to, $subject , $body, $headers); This works fine, send an e-mail to where I want it to. But the html doesn't work it's printing out the tags as they are in the script instead of converting them. My first thought was that my inbox didn't allow html in e-mails for some reason but I checked and thats all fine. Anyone have any idea what I'm doing wrong?
  3. Thanks that was useful but not exactly what I'm looking for. I will try explaining again.. basically I wanna pass two bits if information(two variables). So the information in the input field would be one and these and there will be a second bit of information say the name of the field or something. From a html form to a php script using Ajax. Does that make sense? Sorry I'm really bad at explaining stuff.
  4. How come loads of people are looking at my question but no ones replying? Does what I have written not make since? Is it so easy that you are all just laughing at me? =P
  5. Ever since I started web development I have avoided learning Javascript, probably not the best idea cos now I need to use some. Basically what I want to do is pass two vars from a html form to a php script using Ajax I found out how to pass one no problem but I can't get my head around how I would pass another. It's probably really simple! Here is the html code I'm using and the Ajax file. <script src="clienthint.js"></script> <form action="userinput.php" method="post"> <p><label for="txt1">Username:</label><input type="text" id="txt1" name='username' onkeyup="showHint(this.value)"><span id="txtHint"></span></p> var xmlHttp function showHint(str) { if (str.length==0) { document.getElementById("txtHint").innerHTML=""; return; } xmlHttp=GetXmlHttpObject(); if (xmlHttp==null) { alert ("Your browser does not support AJAX!"); return; } var url="gethint.php"; url=url+"?q="+str; url=url+"&sid="+Math.random(); xmlHttp.onreadystatechange=stateChanged; xmlHttp.open("GET",url,true); xmlHttp.send(null); } function stateChanged() { if (xmlHttp.readyState==4) { document.getElementById("txtHint").innerHTML=xmlHttp.responseText; } } function GetXmlHttpObject() { var xmlHttp=null; try { // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest(); } catch (e) { // Internet Explorer try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } } return xmlHttp; }
  6. Think I've fixed it that you for all your help
  7. Warning: mkdir() expects at most 2 parameters, 3 given in /home2/amytucke/public_html/site/php/album/createalbum.php on line 78
  8. Thanks I will try the absolute pathnames! Not sure what you mean when you say I'm trying to create 2 dirs but I will check the manual. uhmm I wasn't aware that the script I was using needed special permissions what would they be? 777?
  9. I'm having problems when creating files using a php script. The file is created fine but the chmod is not working even though I have set it to 0777 it's been set to 0755. mkdir("../../images/photos/$user_id/$filename1/", 0777); I really can't work out why this line of code is not working other than it being a problem with the server I'm using.
  10. I've found a great GB lib which lets me easily and quickly create graphs using PHP but I can't seem to incorporate the graphs into a html page when I try I get the following error. Does anyone know a way I can get around this?
  11. The first loop finds the $total I need this before I can do the math in the second loop.
  12. I'm trying to do this.. $poll_id_query = mysql_query("SELECT * FROM tblPollQuestions WHERE username = '$user' ORDER BY pollID DESC LIMIT 1 "); $poll_id_array = mysql_fetch_array($poll_id_query); $poll_id = $poll_id_array['pollID']; $poll_question = $poll_id_array['question']; echo "<p>$poll_question</p><br /><p>"; $poll_query = mysql_query("SELECT * FROM tblPollAnswers1 WHERE pollID = '$poll_id' "); while ($poll_array = mysql_fetch_array($poll_query)){ $amount = $poll_array['amount']; $total = $total + $amount; } while ($poll_array = mysql_fetch_array($poll_query)){ $answer = $poll_array['answer']; $amount = $poll_array['amount']; $amount = round((($amount * 100) / $total),1); echo "$answer - <img src='sections/line.jpg' width='14%' height='5'><br />"; } But the second loop doesn't run cos the first one is there.. anyone have any idea what I can do instead? I'm probably coding this really stupidly but it's really late at night and I can't think. Thanks for any help.
  13. When I started writing this script it sounded pretty simple but I've run into a few problems. The script some information from a database and then a loop is used to put the information into variables. What I want is for each time the loop is run it outputs different variables so that these variables can then be used later on in the script. So for example at the moment each time it goes around a different value is assigned to $data1 etc but I want it to create a new variable to put the data into instead of just writing over the old one. $querydata = "SELECT * FROM tblgraphdata WHERE graphID ='1'"; $resultsdata = mysql_query($querydata) or die ("Problem with query:" . mysql_error()); $rowsdata = mysql_num_rows($resultsdata); $i = 0; while ($i < $rowsdata){ $data1 = mysql_result($resultsdata, $i, "data1"); $data2 = mysql_result($resultsdata, $i, "data2"); $data3 = mysql_result($resultsdata, $i, "data3"); $data4 = mysql_result($resultsdata, $i, "data4"); $color = mysql_result($resultsdata, $i, "color"); $i ++; } Any ideas? Thank you soo much for helping!
×
×
  • 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.