Jump to content

JosiaMFire2

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

JosiaMFire2's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Or using css: Size: font-size:1.0em; OR font-size:10px; OR font-size:100%; (for example) Color: color:#ffffff; <td style="font-size:1.0em; color:#ffffff;">
  2. Ok, basicly my page looks like this (I wont use technical details). The problem is page refresh problem. Note all syntax is example and may/is inccorect. $infoq = mysql_query("SELECT * FROM XXX;", $lid); $Table = "<table><tr>"; while($info = mysql_fetch_array($infoq)){ $Table .= "<td>".$info['XXX']."</td>"; } $Table .= "</tr></table>"; if ($_POST['do'] == 'SUBMIT'){ if(mysql_query("INSERT INTO XXX (XXX) VALUES ($_POST['insertthis']);", $lid){ $errorlist .= 'Successfully updated table'; } else { $errorlist .= 'Unsuccessfully updated table'; } } echo "Hi<br>".$Table."<br><input name=\"insertthis\" type=\"text\"><input type=\"submit\" name=\"do\" value=\"SUBMIT\">".$errorlist; Now I can always just add a header refresh below the lines " $errorlist .= 'Successfully updated table';" and " $errorlist .= 'Unsuccessfully updated table';" BUT the problem with this (the problem i am faceing) is that this will refresh, and will refresh the table.. the problem is it discards the errorlist information. So basicly, I want to refresh the page without discarding the log/errorlog information. I do not want this, how can I get around this? I would like to avoid sessions and cookies if possible. NOW I am presuming that moving the create table bit CANNOT be moved below the create table bit. Please dont tell me to move it below. The mysql_fetch_array part of the code MUST stay before. Im not overly good at explainging things, questions are fine, as to what I mean Thanks, Josh
  3. well yah, past the point I showed you. Yes its working on a server (well actually on my local machine, in apache). I am using PHP designer 06 and it is .php
  4. yes that is correct, ecept not just those lines but all code until the html again.
  5. yah, what i thought? anyways just ignore variables, for some reason it displays the actual php code past this line (echo $user.", you are already logged in.<BR><BR>"; ) so yah, ??
  6. Hey, Im still learning to use PHP. I would apreciate it if someone with 5 mins spare would help me out, tell me what I have done wrong. <? Session_start() ?> <HTML> <HEAD> <TITLE>Admin Login</TITLE/> <HEAD> <BODY> <H2>Admin Login</H2> <BR> <? $links = "<A HREF='Admin_panel.php'>Click here to goto main page</A><BR><BR>"; If($name && $password) { If($logged_in_user == $name) {   echo $user.", you are already logged in.<BR><BR>";     echo $links;     exit; } $db = mysql_connect("localhost"); mysql_select_db("Login", $db); $result = mysql_query("SELECT * FROM Name where name = '".$user."'"; AND password = PASSWORD('".$password.")"'); if (!$result) {   echo "sorry, there has been a technical glitch. We cannot enter your details";   exit;   } If (mysql_num_rows($result) > 0) {   $logged_in_user = $user;   session_register("logged_in_user");   echo "Welcome, ".$logged_in_user.".<BR><BR>";   echo $links;   exit;   } else {     echo "invalid login. Please try again.<BR>.<BR>"; } ) } ?> <FORM METHOD=POST ACTION="Login.php"> Your Admin login name: <BR> <INPUT NAME="name" TYPE=TEXT MAXLENGTH=20 SIZE=20> <BR> <BR> Your Admin password:  <BR> <INPUT NAME="password" TYPE=password MAXLENGTH=20 SIZE=20> <BR> <BR> <Input type=submit value="login"> </FORM> </Body> </HTML>
  7. right yah, I recently realised that.. I have been using software php designer, thats why I havent really noticed until now. I have also installed apache with it. Thanks heaps for your prompt reply it helped alot.
  8. Ok, well I have been learning php for a couple of weeks (about an hour a day) I can do bits n pieces. Recently I made a big mistake of setting php by default to open with ie.. this has come to haunt me. whenever I run an html that uses a php script, it will open the ie download box, and try get me to download ?.php, how can I reset ie, so it will try and run the script in ie instead of trying to download the script. I would apreciate quick response, cheers Josh
×
×
  • 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.