-
Posts
219 -
Joined
-
Last visited
Everything posted by yami007
-
how to stop users from downloading my mp3 files?
yami007 replied to yami007's topic in PHP Coding Help
ah it took me 2 months to understand hehe joking but i really forgot about this thanks neil.johnson ^^ -
I found it on ../sources/subs.php thanks anways..
-
yeah u should use double quotes ^^
-
keepin the form values even while reloading it
yami007 replied to yami007's topic in PHP Coding Help
yes here it is : <?php session_start(); ?> <html> <head> <title>add multiple entries !!</title> </head> <body> <form action="add_mutiple_entries.php?n=<?php echo $_GET['n']; ?>" method="post" name="myForm"> The 1 query already active<br /> Name 1: <input type="text" name="name" value="" /> <br /> Age 1: <input type="text" name="age" value="<?php echo $_SESSION['age']; ?>"/><br /> <?php $_SESSION['name'] = $_POST['name']; $_SESSION['age'] = $_POST['age']; ?> <br /> <br /> <?php $i = 1; while ( $i <= $_GET['n'] - 1 ) { $i++; ?> <?php echo '<input type="checkbox" name="add' . $i . '" value="' . $i . '"/> <span>The ' . $i . ' query</span><br />'; echo '<div id="layer1">'; echo "\n"; echo 'Name ' . $i . ' : <input type="text" name="name' . $i . '" /><br />'; echo "\n"; echo 'Age ' . $i . ' : <input type="text" name="age' . $i . '" /><br />'; echo "\n"; echo "</div>"; echo '<br />'; } ?> <br /> <br /> <input type="submit" name="submit" value="submit" /><br /> </form> <form action="?" name="Add"> <label>Add more</label> <select name="n"> <?php if ( $_GET['n'] == 0) { $nb = 1; } else { $nb = 0; } $n = $_GET['n'] + $nb; $i = $n; while ( $i <= 20 - 1) { $i++; $d = $i - 1; echo '<option value="' . $i . '">' . $d . '</option>'; echo "\n"; } ?> </select> <input type="submit" value="add" /> </form> </body> </html> thanks, really need help with this.. -
I just tried smf on my local server and i got my first problem with it well if i wanted to use it in english there would be no problem, but i need the arabic version, what i'm asking about is [ code ] [ /code ] thing, instead of <div class="code">....</div> i want to add the the dir tag so it would be like that : <div class="code" dir="ltr"> i've had enough with it and now looking for your help..
-
i found some functions but they dont work with multiple layers what i want is some function that allows me to show and hide different layers
-
keepin the form values even while reloading it
yami007 replied to yami007's topic in PHP Coding Help
i dont understand this right ??? -
keepin the form values even while reloading it
yami007 replied to yami007's topic in PHP Coding Help
of course I did it ^^ if u see my code well u'll see that i have 2 forms and 2 buttons so when i click the submit button it submits the query very well and when i click the add button it opens the same page with different value to allow me to add more fields but it does not keep the other form's values.. -
keepin the form values even while reloading it
yami007 replied to yami007's topic in PHP Coding Help
it does not work what i understood from u is : <?php $_SESSION['name'] = $_POST['name']; $_SESSION['age'] = $_POST['age']; ?> and call the session name in the value attribute but when i click the " add " button there i see nothing in the form all empty :s -
well here's everythin i want to know how i can keep a value into a form while reloading the same page with different values to allow me to add multiple entries to the db here's my code : <html> <head> <title>add an entry</title> </head> <body> <form action="add_mutiple_entries.php?n=<?php echo $_GET['n']; ?>" method="post"> The 1 query already active<br /> Name 1: <input type="text" name="name" value="" /><br /> Age 1: <input type="text" name="age" value=""/><br /> <br /> <?php $i = 1; while ( $i <= $_GET['n'] - 1 ) { $i++; echo '<input type="checkbox" name="add' . $i . '" value="' . $i . '"/> <span>The ' . $i . ' query</span><br />'; echo "\n"; echo 'Name ' . $i . ' : <input type="text" name="name' . $i . '" /><br />'; echo "\n"; echo 'Age ' . $i . ' : <input type="text" name="age' . $i . '" /><br />'; echo "\n"; echo "<br />"; } ?> <br /> <br /> <input type="submit" name="submit" value="submit" /><br /> </form> <form action="?"> <label>Add more</label> <select name="n"> <?php if ( $_GET['n'] == 0) { $nb = 1; } else { $nb = 0; } $n = $_GET['n'] + $nb; $i = $n; while ( $i <= 20 - 1) { $i++; $d = $i - 1; echo '<option value="' . $i . '">' . $d . '</option>'; echo "\n"; } ?> </select> <input type="submit" value="add" /> </form> </body> </html> help ^^
-
ah man thanks anyway but i forgot to come here after i solved it ^^ well what i did is : flashvars in embed flash and instead of calling songs.php i call songs.php?id=( the id of the selected singer ) and in songs.php i call the songs which have the singer_id = to the id that i get from the url and so it worked very well
-
[SOLVED] problem with htmlentities() and arabic !!!
yami007 replied to yami007's topic in PHP Coding Help
ok guys, solved it the problem was in htmlentities(); i did not know that it does not support arabic characters, so i got rid of it and everything is working fine now ^^ -
[SOLVED] problem with htmlentities() and arabic !!!
yami007 replied to yami007's topic in PHP Coding Help
ah sorry !! well, here's the processing code : <?php include_once("../includes/form_functions.php"); if (isset($_POST['submit'])) { $Name = mysql_prep($_POST['name']); $Time = time(); $errors = array(); $empty_name_error = '<span class="redError">( Enter the product name please !)</span>'; if ( !isset($_POST['name']) OR empty($_POST['name']) ) { $name_error = $empty_name_error; $errors[] = 'name'; } if ( empty($errors)) { $query = "INSERT INTO sales ( name, timestamp ) VALUES ( '{$Name}', '{$Time}' )"; $result = mysql_query($query); if ($result) { $message1 = '<span class="greesSuccess">the product has been added to the database</span>'; } else { $message1 = '<span class="redFail">we could not submit the form please try again later !</span>'; } } else { $message2 = '<span class="redError">you're advised to correct these errors</span>'; } } ?> and here's the form : <form action="adding_product_process.php" method="post" onsubmit="backslash('guestbooktext');BBcode_close('guestbooktext'); return verifchamps();" > <table width="80%"> <tr> <td valign="top"> product name : </td> <td><input style="font-family: Traditional Arabic; unicode-bidi: embed;"type="text" name="name" value="<?php echo htmlentities($Name); ?>" /> <span><?php echo $name_error; ?></span> <span></span> </td> </tr> <td colspan="2"><input type="submit" name="submit" value="submit" /></td> </table> -
for the mail verification you can go here ==> http://www.sitepoint.com/article/users-email-address-php/ it is very useful
-
i type arabic in the input but when the htmlentities function gets it back it displays random characters like Greek i only want to get this error out of my form please help..
-
ah but does it work on windows? :s
-
i stopped by it here http://www.phpclasses.org/browse/package/3747/download/zip.html i'll try it and see and i'll ask you again if i got problems with it thanks you
-
sorry :'( but i dont know nothing about it i just want to get pictures from flv files just like youtube does any function can do that? thanks in advance..
-
[SOLVED] problem with checkdnsrr(); function !!
yami007 replied to yami007's topic in PHP Coding Help
thanks guys ^^ -
[SOLVED] problem with checkdnsrr(); function !!
yami007 replied to yami007's topic in PHP Coding Help
i dont understand, please explain or would u rewrite the code? -
i read tutorial on sitepoint.com >> here the function checkdnsrr(); works great. i just dont know where the problem is. it always echo : nope - invalid email! here is the code i'm using right now : <?php if (checkdnsrr("cool_yami_007@hotmail.com","MX")) echo "yup - valid email!"; else echo "nope - invalid email!"; ?> the email is mine.. so it's not the problem ^^ hope to find an answer
-
[SOLVED] prevent the user from copying a specific paragraph
yami007 replied to yami007's topic in Javascript Help
hehe ok ^^ -
[SOLVED] prevent the user from copying a specific paragraph
yami007 replied to yami007's topic in Javascript Help
well thanks for the help mjdamato and darkfreaks however i ddnt want the no right click function it is bad anyway and u know what? i resolved it with flash i used flashvars to display the random key in flash and so i prevented the user from copying and pasting or what do u think about my thought? is it secured ? thanks again..^^ -
[SOLVED] prevent the user from copying a specific paragraph
yami007 replied to yami007's topic in Javascript Help
it's not like that, i'm beginner at programming and i made myself this verification code: <?php $Confirm = mt_rand(); ?> <tr> <td valign="top" width="100" >Verification :</td> <td valign="top" ><input type="text" name="verification" size="10" value="" /> <label for="verification"> << <?php echo $Confirm; ?></label> </td> </tr> I only want to prevent them to not copy and paste the code directly but to type, and that's the best i could do i know spams are smarter than my code but i wanted to do something though..