Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. I jusr tested it, seams fine!
  2. would probably need to see more of the code, but i am off to bed.. check that session_start(); is at the start of the code. if you go back to my last post and create 3 files login.php, members.php & logout.php with their code and then goto members.php (it should fail) then login.php then back to members.php (should load) you say you put the members.php code on the index.php page.. does this page check the login? if so you should have another page to login, and a different page for members only (well for this example anyway)
  3. the code i posted to should call the values like so echo $_POST['djnamefc'][1]; echo $_POST['djnamefc'][2]; etc but i'll leave you in Barand wise hands, i'm off to bed .... need sleep
  4. your not making a call to the displayLogin function. add displayLogin(); after $logged_in = checkLogin();
  5. try this function initialize() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map_canvas")); map.setCenter(new GLatLng(<?php echo $lat;?>, <?php echo $long;?>), 13); I need my php variables to replace these numbers } }
  6. your need to escape the brackets (square brackets) try this (untested) <?php include ("inc/config.php"); include ("inc/data_djnames.php"); print_r($_POST['djnamefc']); echo "<table border=\"2\" align=\"center\" width=\"383\" bordercolor=\"#000000\" >"; echo "<tr><th>DJ Name</th>"; echo "<th>DJ#</th>"; echo "<th>DJ Color</th></tr>"; for ( $counter = 1; $counter <= 40; $counter += 1) { echo "<tr><td>"; echo $counter; echo "</td><td width=78>"; echo "<font class=\"djname2\">DJ #$counter</font>"; echo "</td><td width=78 >"; echo '<input type="text" value="'.$_POST['djnamefc'][$counter].'" name="djnamefc['.$counter.']" size="10">'; echo "</td></tr>"; } echo "</table>"; ?>
  7. ahh so this then $content = preg_replace('%<span class="foo">(.*?)</span>%sm', '\1', $content);
  8. its a script that only allows members into an area.. okay on your login section you probably set a session, ie <?php session_start(); $_SESSION['UserID'] = 10;//the user id Logout removes its <?php session_start(); $_SESSION['UserID'] = 0;//the user id session_destroy(); members only checks it <?php session_start(); if(empty($_SESSION['UserID'])); { die("No access, please login first"); } echo "welcome";
  9. use $html = strip_tags($html);
  10. a Members only access script should do it..
  11. why not use an array ? ie echo "<input type=\"text\" value='a[]' name=\"a[]\" size=\"10\">"; then print_r($_POST['a']);
  12. this isn't a PHP question MOVE TO: javascript section
  13. goto http://localhost/SCRFix/home.php or http://localhost/home.php depending on the web root path
  14. I should of said.. your going to need a select statement as well! try this $createQuery1 = "SELECT * tblOwnerBK "; $result = mysql_query($createQuery1); while ($row = mysql_fetch_assoc($result)) { echo ("<OPTION value='".$row['ownerID']."'>".$row['Title']." ".$row['name']."</OPTION>"); }
  15. without more detail about the database its hard to say but, i'm sure you don't mean this while ($row = mysql_fetch_assoc($result)) { foreach($row as $value) echo ("<OPTION value=''>".$value['ownerID']."</OPTION>"); } probably something like this while ($row = mysql_fetch_assoc($result)) { echo ("<OPTION value=''>".$row['ownerID']."</OPTION>"); }
  16. that wouldn't case this problem, also please post more than 4 line!
  17. change $diff = $row['diff'] + $diff'; to $diff = $row['diff'] + $diff; note the ' at the end lol i, just read the whole post well done solved i believe
  18. if you use framesets you can just change the target to the name of the frame and the new page
  19. add some error catchin "without anyluck" doesn't really help need more info!
  20. if you put the whole page up i could probably spot it, Okay last thing to check/try //Add this $week = addslashes($week); $day= addslashes($day); $time= addslashes($time); $sql="INSERT INTO calcs (week, day, low, high, diff) VALUES('$week', '$day', '$time', '$time', '0') "; infact you should list($time,$quote,$week,$day) = split(",",urldecode($_REQUEST["n"])); # n=2008-03-17%2005:30:00,15000,1,1 ; to remove the %20
  21. i don't see why your using iframe.. heres a very basic example of php posting to itself from a form <html> <head> <title>any old form</title> </head> <body> Just a normal page with a form and a little php <?php if(isset($_POST)) { $car = $_POST['car']; $bike = $_POST['bike']; $whatever = $_POST['whatever']; echo "you typed: $car, $bike, $whatever"; }else{ ?> <form method="post"> <input name="car" type="text" value="balr" /><br> <input name="bike" type="text" value="balr" /><br> <input name="whatever" type="text" value="balr" /><br> </form> <?php } ?> </body> </html> if you didn't want the whole page to refresh then you would need to look into ajax.
  22. i don't see a select statment! if you mean the selectDB you could try this mysql_select_db("pam_test", $con) or die("database doesn't exist"); but it looks ok to me check you are not missing a } anywhere also quote cause this problem
  23. try echo "<select name=ftype[$i] > <option value=varchar(30)>varchar</option> <option value=int(30)>int</option> <option value=str(30)>str</option> </select>"; echo "<br />";
  24. this isn't a PHP problem is a HTML/CSS problem your need to post their as a side note, it seams a little weird (at least to me) what your trying to do. you could post to its own page and update the scr of the iframe to include the get ie src="frame.php?name=123&lastname=345"
  25. Okay well the STR in the drop down won't work What are you trying to do here ? foreach (($name_array as $n)AND($type_array as $m)) can you do a print_r($_POST); so i can see what data you have i think you mean this! foreach ($name_array as $k => $n) { $m = $type_array[$k];
×
×
  • 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.