jnerotrix
Members-
Posts
208 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
jnerotrix's Achievements
Member (2/5)
0
Reputation
-
This Stuff is soo confusing do you guys see anything wrong with my codes >.<
-
I just get an errors thing and i dont know what to put for numbers on the 5,0,0 Please help thanks
-
hello I have a script that takes ip's and puts them into a text file php gets the ip checks if its already in the file ip.txt if it is not in the file it adds the ip to ip.txt on a new line then another script counts the number of lines. I need the Number of Lines Counted to show up on the image heres all the codes so far ------------ Files: visits.php track.php ip.txt index.php and heres the image i need the text to show up on I need the Text to Show up Next to Total Visits but i dont know how Visit.php <?php include('track.php'); $file = "ip.txt"; $users = count(file($file)); $string = $users; $im = imagecreatefrompng('./track.png'); $textColor = imagecolorallocate ($im, 255, 255, 255); imagestring($im, 5, 0, 0, "$string", $textColor); header ("Content-type: image/png"); imagepng($im); ?> track.php <?php $ip = $_SERVER['REMOTE_ADDR']; $myFile = "ip.txt"; $lines = file($myFile); $lines = array_map('trim',$lines); if(!in_array($ip,$lines)){ $fh = fopen($myFile, 'a') or die("can't open file"); $stringData = "$ip\r\n"; fwrite($fh, $stringData); fclose($fh); } ?> then theres ip.txt and index.php <center> <br><br><br> <h1> Numbmer Of Visited Users Test <br> <?php include ('visits.php'); ?> </center> All I see on the page is The Image "http://joeyelectric.comuf.com/search/index.php" Could Not Be Displayed Because it Contains Errors Please Help Thanks, jnerotrix
-
is it possible to make a page like this INDEX.php <?php session_start(); ?> <title> View it </title> <center> <table border="1"> <form action="./build.php" method="post"> <tr> <td>Video Url:<input type="text" readonly="1" value="http://www.youtube.com/watch?v=" size="30"><input type="Text" name="url"></td> </tr> <tr> <td>(Number)<input type="text" name="times" value="10"> of Times to Display Video in <input type="text" name="reloadtime" value="5">(Seconds)</td> </tr> <tr> <td>Set Width <input type="text" name="setwidth" value="425"> Set Height <input type="text" name="setheight" value="344"> </tr> <tr> <td align="center" valign="center"><input type="submit" name="action" value="Submit"> <input type="hidden" name="submitted" value="yes"> </td> </tr> </form </table> Build.php <?php session_start(); ?> <title> View it </title> <center> <?php $_SESSION['numtimes'] = (isset($_POST['times']) && is_numeric($_POST['times']))?$_POST['times']:10; $_SESSION['url'] = $_POST['url']; $_SESSION['reload'] = $_POST['reloadtime']; $_SESSION['w'] = $_POST['setwidth']; $_SESSION['h'] = $_POST['setheight']; $autoplay = "&autoplay=1"; if ($HTTP_POST_VARS["submitted"] == "yes"){ echo "<meta http-equiv='refresh' content='{$_SESSION['reload']}'>"; } for ($i=0; $i < $_SESSION['numtimes']; $i++) { echo "<object width='{$_SESSION['w']}' height='{$_SESSION['h']}'><param name='movie' value='http://www.youtube.com/v/{$_SESSION['url']}&hl=en&fs=1'></param><param name='allowFullScreen' value='false'></param><param name='allowscriptaccess' value='always'></param><embed src='http://www.youtube.com/v/{$_SESSION['url']}&hl=en&fs=1$autoplay' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='false' width='{$_SESSION['w']}' height='{$_SESSION['h']}'></embed></object>"; } ?> and then go to another page automatically after 30 seconds without losing the sessions data?
-
ok thats fixed but now i have a sessions problem i get this session error Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /www/rack111.com/p/o/p/popcornpetz/htdocs/header.php:7) in /www/rack111.com/p/o/p/popcornpetz/htdocs/index.php on line 11 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /www/rack111.com/p/o/p/popcornpetz/htdocs/header.php:7) in /www/rack111.com/p/o/p/popcornpetz/htdocs/index.php on line 11 and heres the page code <?php include('header.php'); ?> <title> View it </title> <center> <?php if (isset($_POST['action'])) { session_start(); $_SESSION['numtimes'] = (isset($_POST['times']) && is_numeric($_POST['times']))?$_POST['times']:10; $_SESSION['url'] = $_POST['url']; $_SESSION['reload'] = $_POST['reloadtime']; $_SESSION['w'] = $_POST['setwidth']; $_SESSION['h'] = $_POST['setheight']; $autoplay = "&autoplay=1"; if ($HTTP_POST_VARS["submitted"] == "yes"){ echo "<meta http-equiv='refresh' content='{$_SESSION['reload']}'>"; } for ($i=0; $i < $_SESSION['numtimes']; $i++) { echo "<object width='{$_SESSION['w']}' height='{$_SESSION['h']}'><param name='movie' value='http://www.youtube.com/v/{$_SESSION['url']}&hl=en&fs=1'></param><param name='allowFullScreen' value='false'></param><param name='allowscriptaccess' value='always'></param><embed src='http://www.youtube.com/v/{$_SESSION['url']}&hl=en&fs=1$autoplay' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='false' width='{$_SESSION['w']}' height='{$_SESSION['h']}'></embed></object>"; } } ?> <table border="1"> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> <tr> <td>Video Url:<input type="text" readonly="1" value="http://www.youtube.com/watch?v=" size="30"><input type="Text" name="url"></td> </tr> <tr> <td>(Number)<input type="text" name="times" value="10"> of Times to Display Video in <input type="text" name="reloadtime" value="5">(Seconds)</td> </tr> <tr> <td>Set Width <input type="text" name="setwidth" value="425"> Set Height <input type="text" name="setheight" value="344"> </tr> <tr> <td align="center" valign="center"><input type="submit" name="action" value="Submit"> <input type="hidden" name="submitted" value="yes"> </td> </tr> </form </table>
-
Here is the error i get: Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in /www/rack111.com/p/o/p/popcornpetz/htdocs/index.php on line 21 In this code <?php include('header.php'); ?> <title> View it </title> <center> <?php if (isset($_POST['action'])) { session_start(); $_SESSION['numtimes'] = (isset($_POST['times']) && is_numeric($_POST['times']))?$_POST['times']:10; $_SESSION['url'] = $_POST['url']; $_SESSION['reload'] = $_POST['reloadtime']; $_SESSION['w'] = $_POST['setwidth']; $_SESSION['h'] = $_POST['setheight']; $autoplay = "&autoplay=1"; if ($HTTP_POST_VARS["submitted"] == "yes"){ echo "<meta http-equiv='refresh' content=/"$_SESSION['reload'];">"; } for ($i=0; $i < $_SESSION['numtimes']; $i++) { echo '<object width="' . $_SESSION['w']; . '" height="' . $_SESSION['h']; . '"><param name="movie" value="http://www.youtube.com/v/' . $_SESSION['url'] . '&hl=en&fs=1"></param><param name="allowFullScreen" value="false"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/' . $_SESSION['url'] . '&hl=en&fs=1$autoplay" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="false" width="' . $_SESSION['w'] . '" height="' . $_SESSION['h'] . '"></embed></object>'; } } ?> <table border="1"> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> <tr> <td>Video Url:<input type="text" readonly="1" value="http://www.youtube.com/watch?v=" size="30"><input type="Text" name="url"></td> </tr> <tr> <td>(Number)<input type="text" name="times" value="10"> of Times to Display Video in <input type="text" name="reloadtime" value="5">(Seconds)</td> </tr> <tr> <td>Set Width <input type="text" name="setwidth" value="425"> Set Height <input type="text" name="setheight" value="344"> </tr> <tr> <td align="center" valign="center"><input type="submit" name="action" value="Submit"> <input type="hidden" name="submitted" value="yes"> </td> </tr> </form </table>
-
i have a website but and a form they input the data but i need the data they input into the form into a session so the variable is not forgotten so lets say it was like this <?php <form action="2.php" method="post"> NAME: <input type="text" name="1"><br> <input type="submit" value="go"> </form> ?> NEXT PAGE <?php session_start(); $name = $_POST['1']; echo "hello $name"; ?> <a href="./3.php">GOTO THE NEXT PAGE</a> 3d PAGE <?php session_start(); $name = $_POST['1']; echo "hello $name"; ?> Bassicaly i need it to save the inputed data into a session thats rememberd over a series of pages
-
ok now i just need to make the login page This is login.php <form action="login2.php" method="post"> UserName: <input type="text" name="user"><br> Password: <input type="password" name="pass"><br> <input type="submit" value="LOGIN"> </form> What Woulf i put on the login2.php page to check if the login info was correct then put them into a session
-
I have an administration page i have a mysql database popcornpetz_main TABLE: admin (3) Fields username password id (auto Increment) ------------------- I need it so that user must be logged in to view the admin page but i am unsure of how to do this there is no register page needed i just need the page to show if the user is logged in and to show something else if they are not maybe with a session or something but i dont know how also i need a logout button. so it would be like this if admin is logged in { show this } else { show this } thanks for any help jnerotrix
-
Heres The Code I Have <?php $ip = $_SERVER['REMOTE_ADDR']; //Checks Ip $myFile = "ip.txt"; $lines = file($myFile); $lines = array_map('trim',$lines); if(!in_array($ip,$lines)){ $fh = fopen($myFile, 'a') or die("can't open file"); $stringData = "$ip\r\n"; fwrite($fh, $stringData); fclose($fh); } $file = "ip.txt"; $users = count(file($file)); echo "We Have Had $users users Visit This Site"; ?> I need it so - - - if $users = 1000 then do command else do other command so it would look like this i just dont know how to code it <?php if ($users equals 1000 { echo "you are the 1000 User To Visit this Site"; } else { echo "Welcome to My Website"; } ?>
-
Here is something I made a while back it puts user ip's into a text file on a new line and won't add the same ip twice Http://mytestsite.rack111.com/counter/usertrack.zip
-
UPDATE *** ADDED NEW STYLE ------------------------------ Well yea i need more topics its a new forum so i need users to come and visit it But not sure how I am going to advertise it
-
I created a Webmaster Forums Please Leave Comments on what you think::: http://epicbux.com/forums Any Suggestion Please Let Me Know
-
Try this then replace this $Name = "name"; //senders name $email = "name@name.com"; //senders e-mail adress $recipient = $_REQUEST['email']; //recipient $reply = "Congratulations! Video access for " .$_POST['fname']." ".$_POST['lname'].""; with this $fname = $_POST['fname']; $lname = $_POST['lname']; $Name = "name"; //senders name $email = "name@name.com"; //senders e-mail adress $recipient = $_REQUEST['email']; //recipient $reply = "Congratulations! Video access for $fname $lname ";
-
try replacing $reply = "Congratulations! Video access for " .$_POST['fname']." ".$_POST['lname'].""; with this $reply = "Congratulations! Video access for ' . $_POST['fname'] . ' ' . $_POST['lname'] . '"; I EDITED IT SORRY NOW TRY IT