Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8049753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T06:52:14+00:00 2026-06-05T06:52:14+00:00

I’m currently embarked in my first web project, and I think I may have

  • 0

I’m currently embarked in my first web project, and I think I may have taken on too much without the proper experience in PHP + WordPress.

What I’m trying to achieve with this project is to have a website where we have two different users, and 1 user can post custom post types through a form, while the other user can view them in a custom feed for that post type. I’m using WordPress as the CMS, and I’ve tried to solve this problem using WordPress and Custom Post Types. What I realized though, is that it still required a fair amount of PHP experience to put the Post Type in the WordPress loop and display it with the right information.

Someone told me that I should be able to go around WordPress, work in the backend and create everything there, so I connected to the MySQL Database and made some variables for the information that I wanted in my post type.

I have three files this far:

The template file for the submissions:

$
<form action="http://videsignerweb.no/postform.php" enctype="multipart/form-data" method="post" id="oppdragform">
            <input type="text" id="oppdragtittel" name="tittel" />
            <br>
            <select name="oppdragstype" id="oppdragdropdown">
                <option value="idephoto">Idé til Photoshop</option>
                <option value="idehtml">Idé til HTML/CSS</option>
                <option value="ideword">Idé til WordPress</option>
                <option value="photohtml">Photoshop til HTML/CSS</option>
                <option value="photoword">Photoshop til WordPress</option>
                <option value="htmlword">HTML/CSS til WordPress</option>
            </select>
            <br>
            <input type="radio" name="seo" value="Ja"/>Ja + kr 4000,-
            <br>
             <input type="radio" name="seo" value="Nei"/>Nei
            <br><br>
            <input type="radio" name="java" value="Ja"/>Ja + kr 1500,-
            <br>
             <input type="radio" name="java" value="Nei"/>Nei
            <br>
            <input type="file" name="psdfil" />
            <br>
            <input type="textarea" name="prosjektinfo" value="" />
            <br>
            <input type="date" name="dato" value="" />
            <br>




            <input type="submit" name="submit" value="Last opp ditt oppdrag" />

        </form>

The postform.php:

 $
 <html>
 <body>
 <?php
 $connect = mysql_connect('videsignerweb.mysql.domeneshop.no', 'videsignerweb', '25zscHxj') or die ("Connection Faliure");
 mysql_select_db("videsignerweb") or die ("Database failure");

 $tittel = $_POST['tittel'];
 $oppdragstype = $_POST['oppdragstype'];
 $seo = $_POST['seo'];
 $java = $_POST['java'];
 $prosjektinfo = $_POST['prosjektinfo'];
 $dato = $_POST['dato'];



 echo $tittel;
 echo $oppdragstype;
 echo $seo;
 echo $java;
 echo $prosjektinfo;
 echo $dato;
 move_uploaded_file($_FILES["psdfil"]["tmp_name"],
 "uploads/" . $_FILES["psdfil"]["name"]);



 $filelocation="uploads/" . $_FILES["psdfil"]["name"];


 $queryreg = mysql_query("INSERT INTO oppdrag VALUES ('', '$tittel', '$oppdragstype', '$seo', '$java', '$prosjektinfo', '$dato', '$filelocation')");


 if ($_FILES["psdfil"]["error"] > 0)
 {
 echo "Error: " . $_FILES["psdfil"]["error"] . "<br />";
 }
 else
 {
 echo "Upload: " . $_FILES["psdfil"]["name"] . "<br />";
 echo "Type: " . $_FILES["psdfil"]["type"] . "<br />";
 echo "Size: " . ($_FILES["psdfil"]["size"] / 1024) . " Kb<br />";
 echo "Stored in: " . $_FILES["psdfil"]["tmp_name"];
 }
 ?>
 </body>
 </html>

and the Template for displaying the post types:

 $
 <?php
        $connect = mysql_connect('videsignerweb.mysql.domeneshop.no', 'videsignerweb', '25zscHxj') or die ("Connection Faliure");
 mysql_select_db("videsignerweb") or die ("Database failure");


        $sSQL = "SELECT * FROM oppdrag";

 $rsResult = mysql_query($sSQL);

 while ($row = mysql_fetch_array($rsResult))

 {




 echo ("

 <header> {$row['tittel']}</header>
 <article> <br/>
 {$row['info']}

 <br/>
 {$row['type']}Ü

 </article>
 <footer>{$row['dato']}</footer>


 ");





 }



        ?>

If anyone could help me with this, I’d be eternally grateful, I’m really unsure where to go from here, and I’m having troubles finding the right information through search.

Cheers,
Michael

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T06:52:16+00:00Added an answer on June 5, 2026 at 6:52 am

    The key statement is this:

    What I’m trying to achieve with this project is to have a website
    where we have two different users, and 1 user can post custom post
    types through a form, while the other user can view them in a custom
    feed for that post type.

    By “user” do you mean the people using the admin section of the site, or the user groups who will use the front-end of the site?

    For most things WordPress related you shouldn’t need to be playing around with SQL statements at all and be using built in wrapper functions instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I don't have much knowledge about the IPv6 protocol, so sorry if the question
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I want use html5's new tag to play a wav file (currently only supported
I have this code to decode numeric html entities to the UTF8 equivalent character.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.