Redlightpacket
-
Posts
68 -
Joined
-
Last visited
Never
Posts posted by Redlightpacket
-
-
I'm having a problem making the plus sign really bold. I need some help.
p { width:17px; height:19px; padding:5px; text-align: center; border:1px solid #000; font-size: 17px; background-color:#darkslateblue } //the plus that is going to become bold. <p>+</p>
-
I want to make a widget system like netvibes.
I understand you need to know javascript, ajax, dom, css, xhtml, json, but how do each one of them things help make a widget works?
What do dom do to make a widget work?
Could somebody explain to me how each of them things make a widget?
-
I have been stuck on this problem for a while and I really need some help. What my code does is it displays data on the screen and the user can click a link that has a id=1 or whatever id, which it's purpose is to use to save data to the from row 1 or whatever id number it is in the table and copy it to the users table. I'm kind of confused about using the $_GET and trying to copy the data to the database with id and stuff? What do I do????
<?PHP include 'connectdb.php'; session_start(); $id = ""; /////////////////////////////////////////////////////////////////////////////// //Displays bible verses on the verse page. $query = "SELECT * FROM publictb"; $result = mysql_query($query) or die("Query failed: " . mysql_error()); while ($row = mysql_fetch_assoc($result)) { echo'<table border="1"> <tr> <td>';echo $row["idb"];echo'</td> <td>';echo $row["scriptrefb"];echo'</td> <td>';echo $row["scriptureb"]; echo'</td> <td><a href="http://localhost/new_insert.php?id='.$row["idb"]. '">SAVE</a></td> </tr> </table> '; } /////////////////////////////////////////////////////////////////////////////// //Count the row to the database and insert the data to the user database //Try to make a link from a button in php get function
-
thanks for the help pedro!
That helped
-
I want to be able to click on an item and save it a table in a database or insert it into the table. How do I get the data to be saved from the mysql_fetch_assoc results to a table in a database.
Below is some sample code to help you.
$result = mysql_query($query) or die("Query failed: " . mysql_error()); while ($row = mysql_fetch_assoc($result)) { echo'<table border="1"> <tr> <td>';echo $row["idb"];echo'</td> <td>';echo $row["scriptrefb"];echo'</td> <td>';echo $row["scriptureb"]; echo'</td> <td><a href="http://localhost/new_insert.php?id=' . $row['username']. '">SAVE</a></td> </tr> </table> ';
-
UPDATE $sometable SET somecolumn = 'some value' WHERE username = 'Some User';
Can you put a $ in sometable ???????????
-
I want to be able to update data to one particular table each time a user submits their data to a table in a database. There will be different users logging in so I want the update statement to change to that particular user and update data to that particular table with the user logged in. Is this possible or do you go about this another way? I don't know how to do this. Could you give me an example of something that works.
Thanks.
-
i'm trying to get this statement to work but it don't work.
How do you get "$username" part to work.
What i'm trying to do is update the publictb from multiple user tables.
$result = mysql_query("UPDATE $username, publictb SET scriptref='$scriptref' AND scripture ='$scripture' AND WHERE id='$id' AND scriptref='$scriptref' AND scripture ='$scripture'")
-
I have did what it says to do on this page http://www.webmasterworld.com/forum88/4495.htm. I have added the other stuff to the configuration files but nothing really works. The web server works, but php don't work. But here is the link to my php.ini file and my httpd.conf file. Tell me what settings is wrong in them.
download files here:
http://www.mediafire.com/file/mzomzmjznmq/php.ini
http://www.mediafire.com/file/joyhmyzzz3q/httpd.conf
can check them out on my blog here: http://phpcodeexamples.blogspot.com
-
it worked
-
there is simple.php and idea.php.
simple.php displays the stuff on the screen
-
oh, I was trying to explain to you what i was talking about
-
I'm trying to make a comment system
-
see i'm kind of a beginner at programming,. what should i do
-
like that
if($_SERVER['REQUEST_METHOD'] == 'POST'){
$idea = addslashes($_POST['idea']);
}
-
I'll try that
-
I get Undefined index: variable or idea1 error when I come to the "simple page" by clicking on a common id on the "idea page". What's causing it is the $idea = addslashes($_POST['idea1']);-->I'm refering on the "simple page" here. But When I submit the data to the "simple page" again the Undefined index:variable error goes off the screen. Here is the "simple page":
<html> <style type="text/css"> <!-- .style1 { font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 36px; } .style2 { font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold; } .style3 { font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold; } .style4 { font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold; } .style5 { font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold; } --> </style> <?PHP $id = $_GET['id']; ?> <form method="post" action="http://localhost/simple.php?<?php echo'id='.$id;?>"> <pre class="style1">Message</pre> <pre> <script language="Javascript"> <!-- function doClear(theText) { if (theText.value == theText.defaultValue) { theText.value = "" } } //--> </script> <span class="style5">Idea :</span> <textarea name="idea1" cols="55" onFocus="doClear(this)">Talk about whatever. </textarea> <input name="Submit1" type="submit" value="submit" style="width: 117px"> </pre> <pre><--BACK <a href="http://localhost/idea.php">Home</a></pre>; </html> <?php /////////////////////////////////////////////////////// //--------------INPUT--------------------------------- /////////////////////////////////////////////////////// //------------------------------------------- // Connects to database and selects database //------------------------------------------- define('DB_HOST', 'localhost'); define('DB_USER', 'chris'); define('DB_PASS', ''); define('DB_NAME', 'ideadb'); define('DEBUG', true); $con = mysql_connect(DB_HOST, DB_USER, DB_PASS); if(!$con) { // error connecting if(DEBUG === true) { die('Database connection error: ' . mysql_error()); } else { die('Failed to connect to the database.'); } } if(!mysql_select_db(DB_NAME, $con)) { if(DEBUG === true) { die('Failed to select database, error: ' . mysql_error()); } else { die('Failed to connect to database.'); } } /////////////////////////////////////////////////////////////////////////// $idea = addslashes($_POST['idea1']); ///////////////////////////////////////////////////////////////////////// // Creates a table if no table exists ////////////////////////////////////////////////////////////////////////// $array = array('id', $id); $comma_separated = join("", $array); $sql="SELECT * FROM $comma_separated"; $result=@mysql_query($sql); if (!$result) { echo "No table exists"; //Combine $id to a word idtb $array = array('id', $id); $comma_separated = join("", $array); echo $comma_separated; $query = "CREATE TABLE IF NOT EXISTS $comma_separated(id SMALLINT NOT NULL AUTO_INCREMENT PRIMARY KEY, idea VARCHAR(450))"; $result_create = mysql_query($query) or die("Query failed: ".mysql_error()); } $query = "INSERT INTO $comma_separated(id, idea) VALUES (NULL, '$idea')"; $result = mysql_query($query) or die("Query failed: ".mysql_error()); ///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////// //--------------OUTPUT--------------------------------- /////////////////////////////////////////////////////// //Display Ideas on Webpage. //Need database code to do this with. $query = "SELECT * FROM $comma_separated"; $result = mysql_query($query) or die("Query failed: " . mysql_error()); while ($row = mysql_fetch_assoc($result)) { echo'<table border="1"> <tr> <td>';echo $row["id"];echo'</td> <td>';echo $row["idea"]; echo'</td> </tr> </table> '; } /////////////////////////////////////////////////////// ?> Here is the "idea page" <html> <style type="text/css"> <!-- .style1 { font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 36px; } .style2 { font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold; } .style3 { font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold; } .style4 { font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold; } .style5 { font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold; } --> </style> <form method="post" action="http://localhost/simple.php">; <pre class="style1">Message</pre> <pre> <script language="Javascript"> <!-- function doClear(theText) { if (theText.value == theText.defaultValue) { theText.value = "" } } //--> </script> <span class="style5">Idea :</span><textarea name="idea" cols="55" onFocus="doClear(this)">Talk about whatever. </textarea> <input name="Submit1" type="submit" value="submit" style="width: 117px"> </pre> <pre><--BACK <a href="index.php">Home</a></pre> </html> <?php /////////////////////////////////////////////////////// //--------------INPUT--------------------------------- /////////////////////////////////////////////////////// //------------------------------------------- // Connects to database and selects database //------------------------------------------- define('DB_HOST', 'localhost'); define('DB_USER', 'chris'); define('DB_PASS', ''); define('DB_NAME', 'ideadb'); define('DEBUG', true); $con = mysql_connect(DB_HOST, DB_USER, DB_PASS); if(!$con) { // error connecting if(DEBUG === true) { die('Database connection error: ' . mysql_error()); } else { die('Failed to connect to the database.'); } } if(!mysql_select_db(DB_NAME, $con)) { if(DEBUG === true) { die('Failed to select database, error: ' . mysql_error()); } else { die('Failed to connect to database.'); } } //////////////////////////////////////////////////////// /////////////////////////////////////////////////////// //--------------INPUT--------------------------------- /////////////////////////////////////////////////////// $idea = addslashes($_POST['idea']); //Just to give each table a name by user $query = "INSERT INTO stan(id, idea) VALUES (NULL, '$idea')"; $result = mysql_query($query) or die("Query failed: ".mysql_error()); //////////////////////////////////////////////////////// //Display Ideas on Webpage. //Need database code to do this with. /////////////////////////////////////////////////////// //--------------OUTPUT--------------------------------- /////////////////////////////////////////////////////// $query = "SELECT * FROM stan"; $result = mysql_query($query) or die("Query failed: " . mysql_error()); while ($row = mysql_fetch_assoc($result)) { echo'<table border="1"> <tr> <td>';echo $row["id"];echo'</td> <td>';echo $row["idea"]; echo'</td> <td><a href="'; echo'http://localhost/';echo'simple.php?id='.$row['id'];echo'>';echo $row["id"]; echo'</a></td> </tr> </table> '; }
-
try this and see if it works
<?PHP
echo'<style type="';echo'text/css';echo'">
<!--
body {
background-color: #780606;
background-image: url(example.png);
}
-->
</style>';
?>
-
I got you on the database part, but I know you had to create a template page for this page.
-
you had to had a template page for this didn't you?
-
I'm trying to create a comment system, which you make comments to a certain message on another page.
The new page that is created will have all of the new comments on it. The comments can keep on adding up.
What is a better way to do this?
Any body has any good ideas for me?
-
Below I will tell you what I need help with.
// This reads the file into the array. //Do I need a different method right here to put the array into a variable, so //the php and html contents in the file can be created into an another file. $lines = file('http://www.talktopixk.com/post.php'); //Need something to look into the string and replace something in the file string. //str_replace replaces a word in a string $datastr = str_replace("tablestringdatastring", "test", $lines); /////this set of code creates a comment1.php /////////////////////////////////////////////////// $myFile = "comment1.php"; $fh = fopen($myFile, 'w'); $myFile = "comment1.php"; $fh = fopen($myFile, 'w') or die("can't open file"); /////////////////////////////////////////////////// //Write the name of the file. $modFile = "comment1.php"; //But in the end this only writes the html contents and it tries to write php contents of the "post.php", but it don't which I want the PHP contents written to comment1.php file. Why does it stop writing all of the php contents in the php "post.php" file and how can I can be able to write php and html contents together? file_put_contents($modFile,$datastr); fclose($fh);
-
Do you use Pagination to make a Quiz App. Is there any thing else I need to know to use to build a Quiz App.
-
I'm talking about the thing where you click on to rate the articles. Is there any sample javascript code that could help me with this.
Anybody have a good php image upload script
in Third Party Scripts
Posted
I need a good image upload script that works. I would appreciate any help.
Thanks,
Chris