jaylearning
Members-
Posts
13 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
jaylearning's Achievements
Newbie (1/5)
0
Reputation
-
Hi! thanks for looking. i cant seem to work out how to get my drop down menu to select the value that has been selected when submiting. please help me im so new to this i cant work it out i looked at so many tutorials.
-
Hi! i have a form that generates a playlist for flash from mysql. my problem is that i have two value 1 and 0 i need my mysql result only to show value that is set to 1. is there any ways i could use if and else statement to do that? thanks!!!
-
Thanks in advance for looking. i have two pages index.php and test.php on index.php page i have that link. <a href="test.php?url=yes">test.php</a> ------------------------------------------ and on test.php i have when i click on the link its supposed to say "its working!" but it always says "something is wrong!" can you please tell me what im doing wrong?
-
thanks!!!! but it don't help..
-
hi thanks in advance for looking. a [quote] <playlist version="1" xmlns="http://xspf.org/ns/0/"> <trackList> <?php // Get the search variable from URL $var = @$_GET['/'] ; $trimmed = trim($var); //trim whitespace from the stored variable // rows to return $limit=1; // check for an empty string and display a message. if ($trimmed == "") { echo "<p>error</p>"; exit; } // check for a search parameter if (!isset($var)) { echo "<p>We dont seem to have a search parameter!</p>"; exit; } //connect to your database ** EDIT REQUIRED HERE ** mysql_connect("localhost","cast",""); //(host, username, password) //specify database ** EDIT REQUIRED HERE ** mysql_select_db("trailercast") or die("Unable to select database"); //select which database we're using // Build SQL Query $query = "select * from phpizabi_video where processed=1 AND id like \"%$trimmed%\""; // EDIT HERE and specify your table and field names for the SQL query $numresults=mysql_query($query); $numrows=mysql_num_rows($numresults); // If we have no results, offer a google search as an alternative if ($numrows == 0) { echo sorry; } // next determine if s has been passed to script, if not use 0 if (empty($s)) { $s=0; } // get results $query .= " limit $s,$limit"; $result = mysql_query($query) or die("Couldn't execute query"); // begin to show results set // now you can display the results returned while ($row= mysql_fetch_array($result)) { $title = trim($row['url']); } // make a simple variabel $strflv = $title; /* separating each word in previous variabel with explode() function, with double "greater than" sign as a delimiters */ $flvArray = explode(" ", $strflv); foreach($flvArray as $flv) { print "<track><location>".$flv."</location></track>"; } ?> </trackList> </playlist> output looks like this <playlist version="1" xmlns="http://xspf.org/ns/0/"> <trackList> <track><location>add.flv </location></track> <track><location>movietariler.flv </location></track> <track><location>add2.flv</location></track> </trackList> </playlist> need it to look like this - other wise the flash player dont work.. <playlist version="1" xmlns="http://xspf.org/ns/0/"> <track><location>add.flv</location></track> <track><location>movietariler.flv</location></track> <track><location>add2.flv</location></track> </trackList> </playlist> please can you tell me where im going wrong sorry im still learning.... (edited by kenrbnsn to change the to )
-
thanks but still dont help..
-
the book informations dont update they still stay the same. even though i did what you asked me to do.
-
sorry it dont work. thanks.
-
Can any please tell me why this don't update?, im learning so i can't figure out anything, i been trying for last 5 months but can't get it to work. Thank you for looking. <style type="text/css"> <!-- body,td,th { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px; } body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; background-color: #FFFFFF; } --> </style><? //connect to mysql //change user and password to your mySQL name and password mysql_connect("localhost","root",""); //select which database you want to edit mysql_select_db("book"); //If cmd has not been initialized if(!isset($cmd)) { //display all the $result = mysql_query("select * from school_book order by id"); //run the while loop that grabs all the school_book scripts while($r=mysql_fetch_array($result)) { //grab the title and the ID of the school_book $title=$r["title"];//take out the title $id=$r["id"];//take out the id //make the title a link //echo "<a href='editad.php?cmd=edit&id=$id'>$title - Edit</a>"; // echo "<br>"; } } ?> <? if($_GET["cmd"]=="edit" || $_POST["cmd"]=="edit") { if (!isset($_POST["submit"])) { $id = $_GET["id"]; $sql = "SELECT * FROM school_book WHERE id=$id"; $result = mysql_query($sql); $myrow = mysql_fetch_array($result); ?> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="413" align="center" valign="middle"><!-- leftpane --> <table width="413" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> </tr> <tr> <td width="6" bgcolor="#DCE6FF"></td> <td width="440" bgcolor="#DCE6FF"> <form action="book_adit.php" method="post"> <input type=hidden name="id" value="<?php echo $myrow["id"] ?>"> <table width="100%" border="0" cellspacing="1" cellpadding="3"> <tr> <td align="right">Name</td> <td>:</td> <td><input name="title" type="text" id="title" value="<?php echo $myrow["title"] ?>" size="50" /></td> </tr> <tr> <td width="103" align="right"> Categoy </td> <td width="4"> :</td> <td width="311"><input name="category" type="text" id="category" value="<?php echo $myrow["category"] ?>" size="50" /></td> </tr> <tr> <td align="right">Type</td> <td>:</td> <td><input name="type" type="text" id="type" value="<?php echo $myrow["type"] ?>" size="50" /></td> </tr> <tr> <td align="right"> Approved</td> <td> :<br /></td> <td><input name="processed" type="text" id="processed" value="<?php echo $myrow["processed"] ?>" size="5" /> 0 = no / 1 = yes </td> </tr> <tr> <td align="right">Image</td> <td>:</td> <td><input name="image" type="text" id="image" value="<?php echo $myrow["image"] ?>" size="50" /></td> </tr> <tr> <td align="right"> Book Url</td> <td>:</td> <td><input name="url" type="text" id="url" value="<?php echo $myrow["url"] ?>" size="50" /></td> </tr> <tr> <td align="right">Description</td> <td>:</td> <td><textarea name="description" cols="38" id="description"><?php echo $myrow["description"] ?></textarea></td> </tr> <tr> <td align="right"> User / Id </td> <td>:</td> <td><input name="username" type="text" id="username" value="<?php echo $myrow["username"] ?>" size="10"/> <input name="user" type="text" value="<?php echo $myrow["user"] ?>" size="5" user="user"/> <input type="hidden" name="cmd" value="edit" /></td> </tr> <tr> <td align="right"> </td> <td> </td> <td align="right">book Edit <input type="submit" name="submit" value="submit"> </td> </tr> </table> </form> </td> <td width="4" bgcolor="#DCE6FF"> </td> </tr> <tr> <td height="2" colspan="3" bgcolor="#DCE6FF"><img src="/theme/default/images/frame/spacer.gif" alt="Spacer" height="2" /></td> </tr> <tr> <td colspan="3" background="/theme/default/images/frame/block_border_bottom.gif" bgcolor="#AEC5FD"><img src="/theme/default/images/frame/spacer.gif" alt="Spacer" height="14" /></td> </tr> </table> <!-- /leftpane --></td> </tr> </table> <? } ?> <? if ($_POST["submit"]) { $title = $_POST["title"]; $category = $_POST["category"]; $type = $_POST["type"]; $processed = $_POST["processed"]; $image = $_POST["image"]; $url = $_POST["url"]; $description = $_POST["description"]; $username = $_POST["username"]; $user = $_POST["user"]; $sql = "UPDATE school_book SET title='$title', category='$category', type='$type', processed='$processed', image='$image', url='$url', description='$description', username='$username', user='$user' WHERE id=$id"; //replace school_book with your table name above $result = mysql_query($sql) or die(mysql_error()); echo ' <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td align="center" valign="middle"><table width="450" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="6"> </td> <td colspan="2"><h1>Edit book</h1> <p>Please use the form below to edit your book</p></td> </tr> <tr> </tr> <tr> <td height="8" colspan="3"><img src="/theme/default/images/frame/spacer.gif" alt="Spacer" height="8" /></td> </tr> <tr> <td colspan="3" background="/theme/default/images/frame/block_border_top.gif" bgcolor="#AEC5FD"><img src="/theme/default/images/frame/spacer.gif" alt="Spacer" height="14" /></td> </tr> <tr> <td width="6" b gcolor="#DCE6FF"></td> <td width="440" align="center" bgcolor="#DCE6FF"><h1>book Has Updated</h1></td> <td width="4" bgcolor="#DCE6FF"> </td> </tr> <tr> <td height="2" colspan="3" bgcolor="#DCE6FF"><img src="/theme/default/images/frame/spacer.gif" alt="Spacer" height="2" /></td> </tr> <tr> <td colspan="3" background="/theme/default/images/frame/block_border_bottom.gif" bgcolor="#AEC5FD"><img src="/theme/default/images/frame/spacer.gif" alt="Spacer" height="14" /></td> </tr> <tr> <td height="20" colspan="3"><img src="/theme/default/images/frame/spacer.gif" alt="Spacer" height="20" /></td> </tr> </table></td> </tr> </table> '; } } ?>
-
thanks a million for helping me out. im really greatful you helped me.
-
Hi! and thanks for looking, the problem is that when i edit and title it still stays the same im still learning please help me. thanks alot.
-
hi! sorry im new to this and thanks in advance for looking. i wanted to have to 10 image display in a line and then start on a new line or new row how can i achive that please help.... [code]<?php // Get the search variable from URL $var = @$_GET['q'] ; $trimmed = trim($var); //trim whitespace from the stored variable // rows to return $limit=800; // check for an empty string and display a message. if ($trimmed == "") { echo "<p>Please enter a search...</p>"; exit; } // check for a search parameter if (!isset($var)) { echo "<p>We dont seem to have a search parameter!</p>"; exit; } //connect to your database ** EDIT REQUIRED HERE ** mysql_connect("localhost","",""); //(host, username, password) //specify database ** EDIT REQUIRED HERE ** mysql_select_db("") or die("Unable to select database"); //select which database we're using // Build SQL Query $query = "select * from italk where cat like \"%$trimmed%\" order by id desc"; // EDIT HERE and specify your table and field names for the SQL query $numresults=mysql_query($query); $numrows=mysql_num_rows($numresults); // If we have no results, offer a google search as an alternative if ($numrows == 0) { include('sorry.html'); } // next determine if s has been passed to script, if not use 0 if (empty($s)) { $s=0; } // get results $query .= " limit $s,$limit"; $result = mysql_query($query) or die("Couldn't execute query"); // display what the person searched for // echo "<p>You searched for: "" . $var . ""</p>"; // begin to show results set include('css.html'); echo ""; $count = 1 + $s ; // now you can display the results returned while ($row= mysql_fetch_array($result)) { $title = "<a alt=\"".$row['name']."\" OnClick=parent.myframeitalk.location=\"/iTalkPlayerz".$row['video'].".php?access=".$row['access']."&url=".$row['url']."\"><img hspace=\"5\" vspace=\"5\" width=\"88\" height=\"47\" src=\"".$row['img']."\" border=\"0\" class=\"borderimage\" onClick=\"borderit(this,'black')\" onMouseover=\"borderit(this,'#cef2ff'); ddrivetip('<font face=verdana size=1 color=black><b>".$row['name']."</b><br>Access: ".$row['access']. "', 100)\" onMouseout=\"borderit(this,'#009cff'); hideddrivetip()\"></a></font>"; // $count.) echo "$title" ; $count++ ; } $currPage = (($s/$limit) + 1); echo "<br>" ; // next we need to do the links to other results if ($s>=1) { // bypass PREV link if s is 0 $prevs=($s-$limit); print " <a style=\"cursor: hand\" OnClick=location=\"$PHP_SELF?s=$prevs&q=$var\"><< Prev 10</a> - "; } // calculate number of pages needing links $pages=intval($numrows/$limit); // $pages now contains int of pages needed unless there is a remainder from division if ($numrows%$limit) { // has remainder so add one page $pages++; } // check to see if last page if (!((($s+$limit)/$limit)==$pages) && $pages!=1) { // not last page so give NEXT link $news=$s+$limit; echo " <a style=\"cursor: hand\" OnClick=location=\"$PHP_SELF?s=$news&q=$var\">Next 10 >></a>"; } $a = $s + ($limit) ; if ($a > $numrows) { $a = $numrows ; } $b = $s + 1 ; include('css2.html'); echo "<center>Serving help $numrows"; include('css3.html'); ?>[/code]