
WatsonN
Members-
Posts
227 -
Joined
-
Last visited
Everything posted by WatsonN
-
Pings just fine. I use Godaddy Hosting Control Center I dont think they allow it.
-
I tried that and pointed it to the ip just like admin is set up and and it 403s me. You don't have permission to access / on this server.
-
Same thing in latest Safari
-
Oh well If I had of read it right Sorry for the waste of time
-
In the forums when someone post long code. it posts and expands the width of all the elements and looks ugly(TBH) is this because of an update?
-
Hey yall Ive got an issue with a mysql INSERT Query string: INSERT INTO `YBK_Ads` (`BSN`, `CNF`, `CNL`, `ADD`, `CITY`, `STATE`, `ZIP`, `ToA`, `AS`, `PT`, `CN`, `BY`, `ACI`, `TAN`, `VM`, `Date`) VALUES ('Business/Service Name', 'First', 'Last', 'Address', 'City', '38002', 'Business', '1/8', 'Bill', 'check', 'No', 'Ad Copy • Artwork/Photo Instructions', 'Yes', 'No', 'October 6, 2010, 7:15 pm') Produced an error: Column count doesn't match value count at row 1 where is the code mysql_real_escape_string($insert = "INSERT INTO `YBK_Ads` (`BSN`, `CNF`, `CNL`, `ADD`, `CITY`, `STATE`, `ZIP`, `ToA`, `AS`, `PT`, `CN`, `BY`, `ACI`, `TAN`, `VM`, `Date`) VALUES ('{$e1}', '{$e71}', '{$e72}', '{$e2}', '{$e3}', '{$e5}', '{$e10}', '{$e13}', '{$e11}', '{$e6}', '{$e12}', '{$e8}', '{$e15}', '{$e16}', '{$date}')"); mysql_query($insert) or die( 'Query string: ' . $insert . '<br />Produced an error: ' . mysql_error() . '<br />' );
-
Fixed change setcookie(Errors, $error, time()+20); to setcookie('Errors', $error, time()+20);
-
In my login form I'm getting the error Notice: Use of undefined constant Errors - assumed 'Errors' in /home/content/n/a/t/nathanwatson/html/admin/YBK/post.php on line 91 Warning: Cannot modify header information - headers already sent by (output started at /home/content/n/a/t/nathanwatson/html/admin/YBK/post.php:91) in /home/content/n/a/t/nathanwatson/html/admin/YBK/post.php on line 91 Warning: Cannot modify header information - headers already sent by (output started at /home/content/n/a/t/nathanwatson/html/admin/YBK/post.php:91) in /home/content/n/a/t/nathanwatson/html/admin/YBK/post.php on line 92 //if the name exists it gives an error if ($check2 != 0) { //Line 85 $error="<span style="; $error .="color:red"; $error .=">"; $error .= "Sorry, the username is already in use."; $error .="</span>"; setcookie(Errors, $error, time()+20); //Line 91 header('Location: /YBK/'); //Line 92 exit; }
-
Is there a way to set up a sub sub domain such as iphone.admin.mysite.com ? If so how do I accomplish this? Thanks in advanced
-
edit it to your liking <? ... mysql cnx code ... $sql="SELECT id, thing FROM table"; $result=mysql_query($sql); $options=""; while ($row=mysql_fetch_array($result)) { $id=$row["id"]; $thing=$row["thing"]; $options.="<OPTION VALUE=\"$id\">".$thing; } ?> ... html code ... <SELECT NAME=thing> <OPTION VALUE=0>Choose <?=$options?> </SELECT> ...
-
I fixed it by changing it to exit;
-
Changed to header('Location: ./?p=UCP'); but now instead of die() it continues with the script -edit- changed to exit and halts -edit-
-
In my post.php file i have the following code // checks if the username is in use if (!get_magic_quotes_gpc()) { $_POST['username'] = addslashes($_POST['username']); } $usercheck = $_POST['username']; mysql_real_escape_string($usercheck); $check = mysql_query("SELECT username FROM users WHERE username = '$usercheck'") or die(mysql_error()); $check2 = mysql_num_rows($check); //if the name exists it gives an error if ($check2 != 0) { $error="<span style="; $error .="color:red"; $error .=">"; $error .= "Sorry, the username is already in use."; $error .="</span>"; setcookie(Errors, $error, time()+20); header('Location ./?p=UPC'); die(); } The problem is it always 500s if the username is already in use.
-
Yes. Like put your default CSS in there if you want to give them a base and edit it from there.
-
Well you could have a file for each user like username.css and username.html and use fopen()
-
Thank Ya Pawn, That worked perfectly
-
Howdy I'm trying to figure out to get a file to call a page on another domain(diffrent server) and check if the activation code matches the one on the activation server. So on the user's server it has a cron job or on load will call my server and run the code in their update.php file against my activation.php file and see if it matches. If($usr == $actv){ //DO THIS }else{ //run disable script }
-
whats the technique used in navigation of a long page?
WatsonN replied to phpmady's topic in PHP Coding Help
use <A NAME="about-us"> and <A NAME="Services"> then at the top link to them with <A HREF="#about-us">About Us</A> and <A HREF="#Services">Services</A> -
It was displaying the table with the original code but I just want to know how to break each row into its own set of variables
-
They sure are
-
There was but now its gone and the table isn't outputting any data
-
I did that and now I get this error Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/n/a/t/nathanwatson/html/admin/LOGINS.php:1) in /home/content/n/a/t/nathanwatson/html/admin/timer.php on line 3 This is timer.php <?php $error = 'Your session timed out.'; session_start(); if($_SESSION['session_count'] == 0) { $_SESSION['session_count'] = 1; $_SESSION['session_start_time']=time(); } else { $_SESSION['session_count'] = $_SESSION['session_count'] + 1; } $session_timeout = 1800; $session_duration = time() - $_SESSION['session_start_time']; if ($session_duration > $session_timeout) { session_unset(); session_destroy(); session_start(); session_regenerate_id(true); setcookie("Key_WatsonN", 0, time()-3600); setcookie("Errors", 0, time()-3600); setcookie("UID", 0, time()-3600); setcookie("PWD", 0, time()-3600); setcookie(Errors, $error, time()+120000); $_SESSION["expired"] = "yes"; header("Location: /"); // Redirect to Login Page } else { $_SESSION['session_start_time']=time(); } ?>
-
I changed it to <?php $result = mysql_query(sprintf("SELECT * FROM Logins WHERE UID = %d", $_COOKIE['UID_WatsonN'])); //check login table against cookie if(($num = mysql_num_rows($result)) > 0){ mysql_close(); ?> <table border="0" cellspacing="2" cellpadding="2"> <tr> <th>ID</th> <th>UID</th> <th>Site</th> <th>Uname</th> <th>Pass</th> </tr> <center> <?php while ($row = mysql_fetch_array($result, MYSQL_NUM){ $f1 = $row['ID']; //Line 107 $f2 = $row['UID']; $f3 = $row['Site']; $f4 = $row['Uname']; $f5 = $row['Pass']; ?> <tr> <td><?php echo $f1; ?></td> <td><?php echo $f2; ?></td> <td><?php echo $f3; ?></td> <td><?php echo $f4; ?></td> <td><?php echo $f5; ?></td> </tr> <?php } } ?> and got the error Parse error: syntax error, unexpected '{' in /home/content/n/a/t/nathanwatson/html/admin/LOGINS.php on line 107
-
I have a table and the structure is ID, UID, Site, Uname, Pass I already have this <?php $result = mysql_query(sprintf("SELECT * FROM Logins WHERE UID = %d", $_COOKIE['UID_WatsonN'])); //check login table against cookie if(($num = mysql_num_rows($result)) > 0){ mysql_close(); ?> <table border="0" cellspacing="2" cellpadding="2"> <tr> <th>ID</th> <th>UID</th> <th>Site</th> <th>Uname</th> <th>Pass</th> </tr> <center> <?php $i=0; while ($i < $num) { $f1=mysql_result($result,$i,"ID"); $f2=mysql_result($result,$i,"UID"); $f3=mysql_result($result,$i,"Site"); $f4=mysql_result($result,$i,"Uname"); $f5=mysql_result($result,$i,"Pass"); ?> <tr> <td><?php echo $f1; ?></td> <td><?php echo $f2; ?></td> <td><?php echo $f3; ?></td> <td><?php echo $f4; ?></td> <td><?php echo $f5; ?></td> </tr> <?php $i++; } } ?> which only gets the data from that one person. What is in the table is usernames and passwords for diffrent sites and i want to take all the usernames and passwords and put them into variables to pass on to the login form.